This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActioForm in Struts not getting Compiled

 
kavitha kandula
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have developed a Struts project called "MyStrutsApp"

I have place it under
c:\tomcat5.5\webapps\MyStrutsApp\WEB-INF\src\MyActionForm.java

When i try to compile tha abpve file,
Iam getting the error as

Package "javac.Servlet.http.HttpServletRequest does not exist
Package org.apache.struts.action.Action does not exist.

I have set the classpath as follows.

SET CLASSPATH = %CLASSPATH%;.;C:\Tomcat5.5\common\lib\servlet-api.jar;C:\Tomcat 5.5\common\lib\jsp-api.jar
SET JAVA_HOME=C:\jdk1.5.0_12
SET PATH = C:\jdk1.5.0_12\bin;%PATH%

Can anyone suggest me what i need to do to compile "MyActionForm.java"

Thax in advance
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Package "javac.Servlet.http.HttpServletRequest does not exist

The import should be javax.servlet.http.HttpServletRequest

Package org.apache.struts.action.Action does not exist.

You need to set your struts library in your classpath.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kavitha kandula,
Welcome to Javaranch.

I'm going to move this thread to our Java In General (Beginner) forum where javac and CLASSPATH issues are discussed.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic