File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes ActioForm in Struts not getting Compiled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ActioForm in Struts not getting Compiled " Watch "ActioForm in Struts not getting Compiled " New topic
Author

ActioForm in Struts not getting Compiled

kavitha kandula
Greenhorn

Joined: Aug 11, 2007
Posts: 6
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

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.


[My Blog]
All roads lead to JavaRanch
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ActioForm in Struts not getting Compiled