Problems with importing classes in Java

Hello,
i have some problems with a simple project.
The structure is like this:
web-inf/classes/databeans/loginexistinguserform.java
web-inf/classes/formactions/loginexistinguseraction.java
loginexistinguserform.java :
package databeans;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
public class LoginExistingUserForm extends ActionForm
     String userid;
     String password;
     public String getUserid(){return userid;}
     public void setUserid(String newUserid){userid=newUserid;}
     public String getPassword(){return password;}
     public void setPassword(String newPassword) {password=newPassword;}
     public ActionErrors validate(ActionMapping mapping, HttpServletRequest request){
          ActionErrors errors=new ActionErrors();
          if(this.userid==null||this.userid.equals(""))
               errors.add("user",new ActionError("error.userid.required"));
          if(this.password==null||this.password.equals(""))
               errors.add("pass",new ActionError("error.password.required"));
          return errors;
}loginexistinguseraction.java
package formactions;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import databeans.LoginExistingUserForm;
public class LoginExistingUserAction extends Action
     public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
     throws IOException, ServletException
          LoginExistingUserForm loginData=(LoginExistingUserForm)form;
          if(loginData.getUserid().equals("Admin")&&loginData.getPassword().equals("Parola"))
               return mapping.findForward("successLogin");
          else
               return mapping.findForward("failureLogin");
}I can complie succesfully loginexisitinguserform.java but problems appears when i want to compile the second file, loginexistinguseraction.java with command: javac loginexistinguseraction.java
C:\ApacheGroup\Tomcat\webapps\PersonalWeb\WEB-INF\classes\formactions>javac loginexistinguseraction.java
loginexistinguseraction.java:10: package databeans does not exist
import databeans.LoginExistingUserForm;
^
loginexistinguseraction.java:17: cannot find symbol
symbol : class LoginExistingUserForm
location: class formactions.LoginExistingUserAction
LoginExistingUserForm loginData=(LoginExistingUserForm)form;
^
loginexistinguseraction.java:17: cannot find symbol
symbol : class LoginExistingUserForm
location: class formactions.LoginExistingUserAction
LoginExistingUserForm loginData=(LoginExistingUserForm)form;
^
3 errors
I have the CLASSPATH variable setup tu C:/Sun/Appserver/lib/j2ee.jar
Can someone help me ? Thank you in advance !

Thank you very much ! It worked. I'm really new in Jav a programming.
Now i have encoutered another problem. When i want to login, and enter user name and password i am redirected to a login.do page, instead of Welcome.jsp
Here is Login.jsp:
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@page contentType="text/html; charset=ISO-8859-1"%>
<html>
<head><title>Login Form</title></head>
<body>
<html:errors/>
<html:form action="/login">
<table border="0" width="200">
<tr>
     <td>User Name:</td>
     <td><html:text property="userid" maxlength="13"/></td>
</tr>
<tr>
     <td>Password:</td>
     <td><html:password property="password" maxlength="13"/></td>
</tr>
</table>
<br />
<html:submit value="Login"/>
</html:form>
</body>
</html>and here is struts-config.xml :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<!--========================beans for HTML form data=======================-->
<form-beans>
     <form-bean name="loginBean" type="databeans.LoginExistingUserForm"/>
</form-beans>
<!--========================Action Mappings================================-->
<action-mappings>
     <action path="/login" type="formactions.LoginExistingUserAction" name="loginBean" input="/Login.jsp" scope="session">
          <forward name="succesLogin" path="/pages/Welcome.jsp" redirect="true"/>
          <forward name="failureLogin" path="/pages/Diverse.jsp" redirect="true"/>
     </action>
</action-mappings>
    <message-resources parameter="MessageResources" />
</struts-config>

Similar Messages

  • Problems with inner classes in JasminXT

    I hava problems with inner classes in JasminXT.
    I wrote:
    ;This is outer class
    .source Outer.j
    .class Outer
    .super SomeSuperClass
    .method public createrInnerClass()V
         .limit stack 10
         .limit locals 10
         ;create a Inner object
         new Outer$Inner
         dup
         invokenonvirtual Outer$Inner/<init>(LOuter;)V
         ;test function must print a Outer class name
         invokevirtual Outer$Inner/testFunction ()V
    .end method
    ;This is inner class
    .source Outer$Inner.j
    .class Outer$Inner
    .super java/lang/Object
    .field final this$0 LOuter;
    ;contructor
    .method pubilc <init>(LOuter;)V
         .limit stack 10
         .limit locals 10
         aload_0
         invokenonvirtual Object/<init>()V
         aload_0
         aload_1
         putfield Inner$Outer/this$0 LOuter;
         return
    .end method
    ;test
    .method public testFunction ()V
         .limit stack 10
         .limit locals 10
         ;get out object
         getstatic java/io/PrintStream/out  java/io/PrintStream;
         aload_0
         invokevirtual java/lang/Object/getClass()java/lang/Class;
         ;now in stack Outer$Inner class
         invokevirtual java/Class/getDeclaringClass()java/lang/Class;
         ;but now in stack null
         invokevirtual java/io/PrintStream/print (Ljava/lang/Object;)V
    .end methodI used dejasmin. Code was equal.
    What I have to do? Why getDeclatingClass () returns null, but in dejasmin code
    it returns Outer class?

    Outer$Inner naming convention is not used by JVM to get declaring class.
    You need to have proper InnerClasses attribute (refer to http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#79996)
    in the generated classes. Did you check using jclasslib or another class file viewer and verified that your .class files have proper InnerClasses attribute?

  • Problems with importing text messages from PC Suit...

    Problems with importing text messages from PC Suit 7.1.18.0 to my Nokia 5800
     I am trying to import a csv file that contains text messages (Note that this file was created using PC Suit 7.1.18.0) to a subfolder that I have created to My Folders but PC Suits only imports the text messages to the Draft folder. Note that initially it shows that the messages are import in the correct folder but after a refresh it shows them in the Draft Folder. Is their any setting that I should change in the PC Suit or the phone? My computer runs on Windows XP Service Pack 3 and the Nokia 5800 was upgraded to the latest firmware v20.0.012
     Thanks for your help

    Most phones only allows importing of draft and archived box for SMS.
    To do a restoring, you need to backup the SMS as a .nbu file using PC Suite and restore later.
    If you got an SD card, you can also do a backup on the SD Card (backup.arc) then restore later (reset and restore: backup.arc and mmc).
    What's the law of the jungle?

  • Tempo problems with imported wav files

    Hey everyone, sorry if there's a quick fix for this in the forums that I couldn't find, but I've been having some tempo problems with imported .wav files.
    Long story short, my system couldn't handle playing all the tracks for a song while recording drums, so I bounced out an mp3 of the song and put it in a new Logic file so my drummer could just play along to that as I recorded him. Unfortunately, the original song is at 167 bpm, but I forgot to change the bpm in the new Logic file with the .mp3 file of the song to 167 bpm, so it was left at the default 120 bpm.
    So, the drums were recorded at the correct 167 bpm, but Logic thinks that those new drum .wav files should be played at 120 bpm, so when I import my drum tracks back into the original file, they do not play correctly at all.
    I could get record it all again, but I wanted to check if there was a way I could salvage what I already have, since my drummer lives about an hour away right now and can't just come over whenever he wants.
    Thanks for the help! I really appreciate it.

    Hi,
    First, do not use MP3 in Logic, the sound quality is less than AIFF, WAV or CAF, and Logic has to decode it for playback, making it a heavier burden on the CPU than an uncoded audiofile, such as AIFF, WAV or CAF.
    Secondly, audio files are independent of Logic's tempo. If you bounce down an audio file in any format (other than Apple Loop), it will play back at the same speed, +regardless of Logics' tempo setting+, either at recording or playback. Logic doesn't 'think' anything. The BPM is only important to MIDI tracks, or to the spacing between audio files. The audio files themselves *are not affected* by the tempo setting. If you import an audio file of tempo 167 into a 120 BPM project, the file will still play at 167, only Logic will indicate the wrong bar positions.
    regards, Erik.

  • Problem with import file type setting

    Problem with import file type settings - In preferences>general I select "wav encoder" But then going to tools>Create it still says "create mp3 version".
    Can't find a way to overcome this. Thanks for any help.

    Doublechecking, roy. After making the preferences change, are you leaving the General tab by clicking the OK button down the bottom-right-hand corner of the tab?

  • Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    Hi, I have problem with importing MOV files from SJCAM 4000. MOV files are in supported formats for Adobe Premiere Elements 11. But if I'm importing MOV file, only audio part is imported, video part is not imported. How can I solve this problem?

    haben
    From looking at the specifications of your camera (SJCam 4000), we know already what video compression your camera is using. It is H.264.
    A H.264.mov file should be supported by Premiere Elements 11. On what computer operating system is your Premiere Elements 11 running?
    Do you have the latest version of QuickTime installed on your computer? And, are you running QuickTime and Premiere Elements 11 from a
    User Account with administrative privileges? Please go to Premiere Elements 11 Publish+Share/Computer/QuickTime to confirm that you find
    presets there for the QuickTime choice there.
    What are the properties of these H.264.mov files - is it 1080p30 (1920 x 1080p30)  or something else? Do you know if this camera is recording with a variable or
    a constant frame rate?
    Please review and consider and then we will decide what next.
    Thank you.
    ATR

  • Problem with compilation of HelloWorld.java

    hi,
    getting problem with compilation of HelloWorld.java
    CLASSPATH--- C:\java
    PATH--- C:\j2sdk1.4.2_04\bin
    HelloWorld.java source code in: C:\java
    On cmd prompt:
    C:\java>javac HelloWorld.java
    error: cannot read: HelloWorld.java
    1 error
    pls help me with this
    rgds,
    sanlearns

    What does this command yield?
    dir HelloWorld.java

  • Problem with importing

    Hi all, I recently downloaded elements 11, and I imported some photos okay, but now it starts to import, gets about half way, and a box saying elements organizer has stopped working. When I went into problem details, it said appcrash. any ideas wot be goin on. (Im importing photos in raw) Regards. Paul.

    Thanks for the reply jon. I was only importing 152 pics. off my nikon camera. I re downloaded elements 7 on to the puter, and they went straight on there with no trouble, so I would of thought they would go straight on to elmnts. 11. ho hum.and strange.
    Date: Fri, 18 Jan 2013 04:58:39 -0700
    From: [email protected]
    To: [email protected]
    Subject: Problem with importing
        Re: Problem with importing
        created by 99jon in Photoshop Elements - View the full discussion
    Hi Paul  What are your system specs. Raw files are usually quite large so the process could be draining your memory (RAM). Are you importing from camera or from your hard drive. In the case of the latter try importing one folder at a time or in smaller batches. You can select files and drag and drop into the organizer. You must drop on the dark gray area between the left and right side panels (if both panel are visible).
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5003831#5003831
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5003831#5003831
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5003831#5003831. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Elements by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Getting problem with DOMImplementation classes method getFeature() method

    hi
    getting problem with DOMImplementation classes method getFeature() method
    Error is cannot find symbol getFeature()
    code snippet is like...
    private void saveXml(Document document, String path) throws IOException {
    DOMImplementation implementation = document.getImplementation();
    DOMImplementationLS implementationLS = (DOMImplementationLS) (implementation.getFeature("LS", "3.0"));
    LSSerializer serializer = implementationLS.createLSSerializer();
    LSOutput output = implementationLS.createLSOutput();
    FileOutputStream stream = new FileOutputStream(path);
    output.setByteStream(stream);
    serializer.write(document, output);
    stream.close();
    problem with getFeature() method

    You are probably using an implementation of DOM which does not implement DOM level-3.

  • Problems with import slides powerpoint

    Hello,
    I have a problem with import slides from the powerpoint, when
    I try to import, the computer blow.
    What I can do?

    there have been lots of issues regarding this, however, I
    have found that if I export my ppt as individual jpeg slides I can
    then use the "insert > Slide > Image Slide" command to bring
    in my ppt slides, I have tried everything else as well but what was
    happening to me was Captivate 3 was losing all of my text and text
    animation. Now my animation is not critical, however, the text is
    very important of course. So now I have stagnat slides, a bit
    boring but at least I was able to finish my project.
    Hope this helps.
    Tony :)

  • Problems with import from textfile

    Hi
    We are experiencing problems with importing tables from a text-file. We are using Designer 6i (NT) release 2.
    Some of the column sequences are lost others are changed.
    Foreign keys are lost if the referenced table is after in alphbetical order! Not null columns are nullified and the column of the primary key definition is lost.
    Has anyone had similar problems and/or know of a workaround?

    Hi
    We are experiencing problems with importing tables from a text-file. We are using Designer 6i (NT) release 2.
    Some of the column sequences are lost others are changed.
    Foreign keys are lost if the referenced table is after in alphbetical order! Not null columns are nullified and the column of the primary key definition is lost.
    Has anyone had similar problems and/or know of a workaround?

  • A problem with importing layered PSD file into Flash

    Hi.
    There's a problem with importing layered PSD file into Flash.
    If I import a layered PSD file, some part the color of the lower layer is shown at the edge of objects or shadows. Instead, if I crop each layers first and import them, there's no problem.
    If the higher layer has brush or transparent effects, it becomes worse.
    Any help with this problem?
    Thanks.

    How was the original art created? Was the original RGB or CMYK? What is the resolution of the Photoshop file? Flash only works well with RGB and 72 pixel per inch resolution. If your original art is not set this way, then Flash will attempt to convert it as it imports it. Flash uses the sRGB color space. You'll get the best color translation if your Photoshop file is using this color preference.

  • Premiere Pro CS5: please help problem with importing a file error output "there was an error decompressing audio or video"

    please help problem with importing a file error output "there was an error decompressing audio or video"

    this is related to what adobe program/version?

  • Hi Guys, I have a problem with Importing Pictures onto my Mac mini with Lion installed by using a Card Reader, What is the problem here so I can get Pictures onto my Computer. ,

    Hi Guys,
    I have a problem with Importing Pictures onto my Mac mini with Lion installed by using a Card Reader,
    What is the problem here so I can get Pictures onto my Computer. ,

    Hi Noob Søren
    There are a few things that are confusing in your question.
    As far as I know, you dont have to install Time Machine on this OS as it is already installed for you. You only need to connect a hard drive to your computer via firewire or usb, click on the Time Machine icon, Open Time Machine Preference in the drop down menu and select a disk: your connected hard drive.
    You can of course reformat this connected device, partition it into a few volumes to organise data if you so wish.
    I find it strange that your mac's hard drive is divided into two volumes... perhaps this was created through bootcamp?
    You can access the configuration of your hd through Applications/Utilities/Disk Utilities.
    Clicking on one of the icons on the right hand panel will bring the details of the contents of your hardDrive and volumes. From there you can decide to erase a partition, reformat etc....
    If your hd contains more than one volume, and one of them is empty, you could decide to remove it. Back up all your important data before doing so.
    Hope this helps
    WN

  • Problems with importing in FCPX

    I am having problems with importing my recent holiday video intoFCPX  I have copied all the files from my Panasonic camera into my separate hard drive and they all appear there correctly.
    When I connect the camera to the computer it automatically opens in iPhoto which is a nuisance as I have to stop it from doing so.
    Now comes the problem when I ask to import media into a new project FPCX simply freezes and stops responding.
    If I ask FPCX to import direct from the camera it says it can't re-import because all the material is already in the second hard drive where I store my projects.
    So in a nutshell the programme simply does not respond to importing.
    Any help please or is this a technical problem I have with my Mac.
    Thanks
    A new iMac version 10.9.2
    OS Mavericks
    FPC up dates are all installed

    First, what specific camera are you using?
    Next, create a folder on your hard drive, give it a name you'll recognize, then copy the entire contents of your camera card into it, keeping the full file/folder heirchy in tact.  Disconnect the camera.  Then import from that folder.
    What do you mean specifically when you say "the programme simply does not respond to importing"?  That is sort of a vauge statement.
    Finally, go into the Preferences of iPhoto, you can set it to NOT open when you plug your camera in, and never have that happen any longer.

Maybe you are looking for

  • How to fix error -36

    Hi, does anyone know how to fix "err=-36"? It has never happened before until suddenly it stopped working properly yesterday. The error message is err = -36 and "The disk could not be read from or written to. Please check that the connection to the n

  • Where is source data coming from?

    Hi, I've cobbled togeher a working app (based on some examples found on the net). The application works well, but I have one specific question as to why it works! The application takes data from the mic on my pc and saves it to a file. I can play bac

  • Workflow task in "In Process"

    Hi all, I have a workflow task that stayed in the "In Process" state.  The task's method calls a function.  I don't know if the function had an error or what actually happened.  The function makes a call to a third party software(PRISM).  I have the

  • FB01 Enter Trading Partner for Posting Key 01 (Customer Invoice)

    Dear Experts, I would like to ask is it possible to enter the Trading Partner for the FI Document line item with Posting Key 01. I can modify the Trading Partner for Posting Key 40 and 50 but I cannot find field in the More Data Button. Can anyone he

  • JDBC Adapter configuration not initialized Error

    Hi, I am doing a RFC to JDBC scenario in PI 7.1. I am getting the following error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: JDBC Adapter configuration not initialized: null In communication channel monitoring, it shows th