troubleshooting Question

problem with classpath struts.

Avatar of muthiahmerchant
muthiahmerchant asked on
JSP
6 Comments1 Solution2624 ViewsLast Modified:
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\struts.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\WEB-INF\classes\coreservlets\RegisterAction1.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\WEB-INF\classes\coreservlets\RegisterAction1.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\WEB-INF\classes\coreservlets\RegisterAction1.java:7: cannot find symbol
symbol  : class ActionMapping
location: class coreservlets.RegisterAction1
  public ActionForward execute(ActionMapping mapping,
                               ^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WEB-INF\classes\coreservlets\RegisterAction1.java:8: cannot find symbol
symbol  : class ActionForm
location: class coreservlets.RegisterAction1
                               ActionForm form,
                               ^
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\struts-test\WEB-INF\classes\coreservlets\RegisterAction1.java:7: cannot find symbol
symbol  : class ActionForward
location: class coreservlets.RegisterAction1
  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\struts.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
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros