Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem running Struts Application

 
Abhik Ghosh
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic