File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Problem in compiling .java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in compiling .java" Watch "Problem in compiling .java" New topic
Author

Problem in compiling .java

Amita Narote
Greenhorn

Joined: Feb 07, 2003
Posts: 5
hi,
my form bean contains following imports
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
while compiling it gives following errors....
C:\tomcat\webapps\wily\WEB-INF\classes\wiley\LookupForm.java:4: cannot resolve symbol
symbol : class ActionForm
location: package action
import org.apache.struts.action.ActionForm;
^
C:\tomcat\webapps\wily\WEB-INF\classes\wiley\LookupForm.java:5: cannot resolve symbol
symbol : class ActionMapping
location: package action
import org.apache.struts.action.ActionMapping;
why so as i'ven't included a struts.jar in classpath. it is in lib under 'WEB-INF'
For convinence i'm compiling it thr' TextPad....
plz tell me the solution.....
Amita.....
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
The struts.jar has to be located somewhere on the class path in order to compile. I put it in the jre/lib/ext directory. But it must ALSO be in the WEB-INF/lib directory in order to execute.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Amita Narote
Greenhorn

Joined: Feb 07, 2003
Posts: 5
hi,
thanks for reply....
but sorry to say that.... whatever u have suggested has already done by me...but still i've that problen.... so plz suggest some other option...
thanx to u
regards,
Amita...
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
If it isn't finding the class then it isn't in your classpath. How are you compiling? From the command line or with an IDE?
Amita Narote
Greenhorn

Joined: Feb 07, 2003
Posts: 5
hi,
ya the CLASSPATH is perfect...
and other thing is i tried both the ways of compilling i.e. thr' command prompt and thr' IDE(i'm using TextPad for it).....
plz tell the solution......
thanx for every thing....u provided.....
but plz tell some other solution.....
Regards,
Amita....
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Try reinstalling struts. It sounds like it is finding the package but not the classes.
 
wood burning stoves
 
subject: Problem in compiling .java