Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compilation Problem

 
Shailesh Pillai
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is problem with class path. Make sure that your class path is correct.
 
sreedhar lak
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shailesh Pillai
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic