This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
LookupForm lookupForm = (LookupForm) form; //Error occurs here as Cannot Resolve Symbol
lookupForm.getxxx(); }
LookupForm is the JavaBean class which has getter and setter methods.When i tried to access that class in LookupAction,it couldnt identify the LookupForm.
I also tried to import the class(LookupForm) along with the package name in LookupAction class.Then too it produces the same error.
Have you verified that the LookupForm class exists in the appropricate subdirectory within the /WEB-INF/classes directory? Is /WEB-INF/classes in your compile-time classpath? [ August 18, 2006: Message edited by: Merrill Higginson ]
Originally posted by Merrill Higginson: Have you verified that the LookupForm class exists in the appropricate subdirectory within the /WEB-INF/classes directory? Is /WEB-INF/classes in your compile-time classpath?
[ August 18, 2006: Message edited by: Merrill Higginson ]
Hi Merrill,
I created a new directory called app inside WEB-INF/classes and placed 2 java files(LookupForm&LookupAction).
During the compilation,I have set the path till the subdirectory as WEB-INF/classes/app. Then too I get the same error...
import app.LookupForm in my action class.Even in that statement too it throws an error
cannot resolve symbol
Jasna Dosen
Greenhorn
Joined: Aug 27, 2002
Posts: 5
posted
0
Sorry, I saw lately that you alredy tried that. I can tell you what is my organization of classes.
Java classes are stored under the WEB-INF/src (pure Java code) and destination classes directory(include in build path) is defined in Eclipse environment as WEB-INF/classes. Obviosly there is some problem with classpath and visibility. It is hard to tell more without more information about your development environment.
Vid Srini
Ranch Hand
Joined: Aug 17, 2006
Posts: 35
posted
0
Jasna,
I didnt use any IDE.I created a working folder sample under Tomcat 5.0>webapps directory
I placed both the Java source code as well the class files in the following folder structure: Tomcat 5.0>webapps>WEB-INF>classes>app
Pls help me out to solve this issue.Iam new to struts and strucked up with this issue.
Thanks, Vidhya S
Jasna Dosen
Greenhorn
Joined: Aug 27, 2002
Posts: 5
posted
0
If your LookupForm.java starts with:
package app;
you should put WEB-INF/classes as a path not WEB-INF/classes/app
Rgd, Jasna
Vid Srini
Ranch Hand
Joined: Aug 17, 2006
Posts: 35
posted
0
Hi Jasna,
My pbm is solved.Thanks a lot for your inputs.
The first mistake was i had set the path till the package
second one was my classpath was overridden everytime
solved both the issues.
Thanks a lot, Vidhya S
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Struts : Error during compilation of Action Class