muthiahmerchant
asked on
problem with classpath struts.
Hi all
I am using windows xp. my classpath = .;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api .jar; C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar ; C:\softwares\struts\struts -1.2.8-bin \lib\strut s.jar.
I have set this under my user varaible and system variable.
when i try to compile using javac filename.java it gives me an error
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE B-INF\clas ses\corese rvlets\Reg isterActio n1.java:4: package org.apache.struts.action does not exist
import org.apache.struts.action.* ;
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE B-INF\clas ses\corese rvlets\Reg isterActio n1.java:6: cannot find symbol
symbol: class Action
public class RegisterAction1 extends Action {
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE B-INF\clas ses\corese rvlets\Reg isterActio n1.java:7: cannot find symbol
symbol : class ActionMapping
location: class coreservlets.RegisterActio n1
public ActionForward execute(ActionMapping mapping,
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE B-INF\clas ses\corese rvlets\Reg isterActio n1.java:8: cannot find symbol
symbol : class ActionForm
location: class coreservlets.RegisterActio n1
ActionForm form,
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE B-INF\clas ses\corese rvlets\Reg isterActio n1.java:7: cannot find symbol
symbol : class ActionForward
location: class coreservlets.RegisterActio n1
public ActionForward execute(ActionMapping mapping,
^
5 errors
Tool completed with exit code 1
but when i compile in dos using javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api .jar; C:\softwares\struts\struts -1.2.8-bin \lib\strut s.jar" filename.java. it works fine. l
somebody please tell me what is wrong with my classpath. I am using tomcat 5.5, windows xp and struts 1.2
I am using windows xp. my classpath = .;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api
I have set this under my user varaible and system variable.
when i try to compile using javac filename.java it gives me an error
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE
import org.apache.struts.action.*
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE
symbol: class Action
public class RegisterAction1 extends Action {
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE
symbol : class ActionMapping
location: class coreservlets.RegisterActio
public ActionForward execute(ActionMapping mapping,
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE
symbol : class ActionForm
location: class coreservlets.RegisterActio
ActionForm form,
^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WE
symbol : class ActionForward
location: class coreservlets.RegisterActio
public ActionForward execute(ActionMapping mapping,
^
5 errors
Tool completed with exit code 1
but when i compile in dos using javac -classpath "C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api
somebody please tell me what is wrong with my classpath. I am using tomcat 5.5, windows xp and struts 1.2
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, that worked, do you know anything about the deprecation part
ASKER
I have tried eclipse, but I find it a little difficult to work with it. I have just started using Java
Oh yes, ActionErrors have been deprecated in favour of ActionMessages so you should really be using them instead of ActionErrors.
Stick with Eclipse, not only will you find it easier to develop with but employers want people with experience with IDEs like Eclipse and NetBeans.
Stick with Eclipse, not only will you find it easier to develop with but employers want people with experience with IDEs like Eclipse and NetBeans.
ASKER
Thanks a lot for your help
ASKER
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\MiniHR\WEB-INF
asses\com\jamesholmes\mini
bin\lib\struts.jar;C:\Prog
\lib\servlet-api.jar" -deprecation SearchForm.java
SearchForm.java:7: warning: org.apache.struts.action.A
truts.action has been deprecated
import org.apache.struts.action.A
^
SearchForm.java:73: warning: org.apache.struts.action.A
struts.action has been deprecated
new ActionError("error.search.
^
SearchForm.java:72: warning: add(java.lang.String,org.a
nError) in org.apache.struts.action.A
errors.add(null,
^
SearchForm.java:80: warning: org.apache.struts.action.A
struts.action has been deprecated
new ActionError("error.search.
^
SearchForm.java:79: warning: add(java.lang.String,org.a
nError) in org.apache.struts.action.A
errors.add("ssNum",
^
5 warnings
why does this happen