Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in compiling .java

 
Amita Narote
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Amita Narote
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try reinstalling struts. It sounds like it is finding the package but not the classes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic