aspose file tools*
The moose likes Struts and the fly likes Compilation Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


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

Compilation Problem

Shailesh Pillai
Ranch Hand

Joined: Jan 24, 2006
Posts: 78
Hi Ranchers,
I am getting errors while compiling the ActionForm class and Action class.
The errors are :
cannot resolve symbol class Action
cannot resolve symbol class ActionMapping
cannot resolve symbol class ActionForward
cannot resolve symbol class HttpServletRequest
cannot resolve symbol class HttpServletResponse
cannot resolve symbol class ActionErrors

Eventhough i have added the servlet.jar from TOMCAT_HOME/common/lib to the Classpath. I also added all the .jar files under the jakarta-struts-1.2/lib directory to the classpath. Still i m getting the same errors.
Can anyone sort it out.....
Thnx in advance
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
It is problem with class path. Make sure that your class path is correct.
sreedhar lak
Ranch Hand

Joined: Feb 26, 2006
Posts: 42
Hi Shailesh,
Thats the problem with classpath setting only and at the same time set the path also.
for path: set path=C:\j2sdk1.4.2_08\bin;C:\Tomcat 5.0\bin

set classpath=C:\j2sdk1.4.2_08\lib;C:\Tomcat 5.0\common\lib\servlet-api.jar;D:\sreestruts\WEB-INF\lib\struts.jar;.;

Take care about jdk installation and tomcat installation and for ur sake i put struts.jar in difft dir,you can put in lib of tomcat and remeber you should give complete path with struts.jar as name...
i.e,dont put upto lib
let me know...whether it is working


Thanks a lot<br />Learn from yesterday, live for today, hope for tomorrow. The important thing is to not stop questioning
Shailesh Pillai
Ranch Hand

Joined: Jan 24, 2006
Posts: 78
Thanx Sreedhar and KJ,
Its working....
But after getting compiled it is showing me a MESSAGE :
Some input files use or override a deprecated API
Recompile with -deprecation for details
Mishra Anshu
Ranch Hand

Joined: Sep 16, 2003
Posts: 224
You are ready to work now !!!
Use the compile with -deprecation option which will show you what, you are using has been deprecated. You better change it with, newer and better API.

cheers


"Ignorance is bliss"
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
As Mishra told you are using some methods which are depreciated methods(olds methods which are not in use). Please check the documentaion to replace those depereciated methods as it is not advisable to use depricated methods.
Shailesh Pillai
Ranch Hand

Joined: Jan 24, 2006
Posts: 78
Thanks Anshu and KJ
The org.apache.struts.action.ActionErrors class is Deprecated.
Instead org.apache.struts.action.ActionMessages class is there in place of it since Struts 1.2.0 version.
naraharirao mocherla
Ranch Hand

Joined: Aug 16, 2005
Posts: 45
Hi friends,
I'm using log method in processPreprocess method of RequestProcessor.
I'm getting the error as I'm using the deprecated API.

Can Anyone suggest me what should I change to get my .java file compiled.where can I find which methods to use Instead of old deprecated methods.

I found this statement in the struts-documentation regarding the log method .


Use commons-logging instead. This(log method) will be removed in a release after Struts 1.2.

what is meant by commons-logging .



Thanks,

narahari
[ June 13, 2006: Message edited by: naraharirao mocherla ]
 
Don't get me started about those stupid light bulbs.
 
subject: Compilation Problem
 
Similar Threads
help!: AdviceClient.java does not compile
problem in Compiling servlets
Problem in compiling .java
Error compiling the AdviceClient.java
Inconvertible types error!!!