aspose file tools*
The moose likes Struts and the fly likes Problem running Struts Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem running Struts Application" Watch "Problem running Struts Application" New topic
Author

Problem running Struts Application

Abhik Ghosh
Ranch Hand

Joined: Feb 28, 2008
Posts: 32
I have the following:

apache-tomcat-6.0.20 in C:\apache-tomcat-6.0.20 ,
struts-2.1.6-all in C:\struts-2.1.6-all,
JAVA_HOME is C:\Program Files\Java\jdk1.5.0_10\bin
CLASSPATH is .;C:\apache-tomcat-6.0.20\apache-tomcat-6.0.20\lib\servlet-api.jar;C:\apache-tomcat-6.0.20\apache-tomcat-6.0.20\webapps\user1\WEB-INF\classes
PATH is C:\Program Files\Java\jdk1.5.0_10\bin

I have my application in C:\apache-tomcat-6.0.20\apache-tomcat-6.0.20\webapps\user1

When I try to compile the java files from
C:\apache-tomcat-6.0.20\apache-tomcat-6.0.20\webapps\user1\WEB-INF\src

i get the error:

LoginForm.java:2: package org.apache.struts.Action does not exist
import org.apache.struts.Action.*;
^
LoginForm.java:5: package org.apache.struts.action does not exist
public class LoginForm extends org.apache.struts.action.ActionForm
^
2 errors

This looks like a classpath problem, but i don't get it.

Please help.

Thanks
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

You're not misconfigured the struts jar files only, but also taken a wrong Struts version, the org.apache.struts.Action class comes in Struts1.x and you're using Struts 2.
So download the Struts 1.3.9 build and set those jar in classpath.

And please carefully choose the forum, its not Struts section.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem running Struts Application