aspose file tools*
The moose likes Tomcat and the fly likes problem with struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem with struts " Watch "problem with struts " New topic
Author

problem with struts

Eldo Zacharia
Greenhorn

Joined: Nov 08, 2004
Posts: 5
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\Tomcat\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

Iam doing anything wrong plz let me know if iam

anyone help.


this is the output on 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:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\li
b\struts.jar

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

C:\Program Files\Tomcat\webapps\MiniHr\WEB-INF\src\com\miniHr>set classpath=C:\j2sdk1.4.0\jre\lib\rt.jar;.;C:\Program Fi
les\Tomcat\common\lib\servlet.jar;.;C:\struts\jakarta-struts-1.1-b2\lib\struts.jar;.;C:\Program Files\Tomcat\webapps\Min
iHr\WEB-INF\classes;cp;cp

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,
^
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5201
    
  12

what do you get if you do a print of your classpath-variable after you do your initializations? e.g. with

also, i guess


has to be changed into



SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem with struts