Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 8th, 2004, 11:24 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem running Struts

hi ,
I am very much new to struts ..so i have a problem compiling and building struts application .. i have followed the standard directory structure ..buti get the errors below during compilation this is the classpath i have set in the environment variable section (windows xp)
C:\j2sdk1.4.\jre\lib\rt.jar;.;C:\ProgramFiles\Tomc at\common\lib\servlet.jar;.;C:\struts\jakarta-struts-1.1-b2\lib\struts.jar;.;C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\classes

and i use the following .bat file on the cmd line to complie

set cp = C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\lib\struts.jar
set cp =%cp%;C:\Program Files\Tomcat\common\lib\servlet.jar
set classpath=%classpath%;%cp%
javac -d ..\..\..\classes *.java

This is what i get at the cmd window


C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>set_classpath

C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>set cp = C:\Progra
m Files\Tomcat\webapps\MiniHr\WEB-INF\lib\struts.jar

C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>set cp =;C:\Progra
m Files\Tomcat\common\lib\servlet.jar

C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>set classpath=C:\j
2sdk1.4.0\jre\lib\rt.jar;.;C:\Program Files\Tomcat\common\lib\servlet.jar;.;C:\s
truts\jakarta-struts-1.1-b2\lib\struts.jar;.;C:\Program Files\Tomcat\webapps\Min
iHr\WEB-INF\classes;.;C:\j2sdk1.4.0\bin;;

C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>javac -d ..\..\..classes *.java
SearchAction.java:8: cannot resolve symbol
symbol : class ActionFoward
location: package action
import org.apache.struts.action.ActionFoward;
^
SearchAction.java:16: cannot resolve symbol
symbol : class HttpRequest
location: class com.miniHr.SearchAction
HttpRequest request,
^
SearchAction.java:17: cannot resolve symbol
symbol : class HttpResponse
location: class com.miniHr.SearchAction
HttpResponse response)throws Exception
^
SearchAction.java:14: cannot resolve symbol
symbol : class ActionFoward
location: class com.miniHr.SearchAction
public ActionFoward execute(ActionMapping mapping,

Plz help
Eldo

eldo
 
Old November 15th, 2004, 11:50 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you have to set classpath for all the related jar files
If you are working in eclipse or intelligeIdea go to classpath and click add external jar files and start adding

shareef





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in using struts validator skmmail Struts 0 September 4th, 2007 06:00 AM
problem running struts Miss komal Struts 2 August 2nd, 2006 03:12 AM
problem in struts javed Struts 1 August 2nd, 2006 12:34 AM
Problem with Tomcat/Struts IronStar Apache Tomcat 1 February 16th, 2005 01:23 AM
problem in struts svarupula Apache Tomcat 1 January 24th, 2005 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.