aspose file tools*
The moose likes Struts and the fly likes can not be able to compile Action Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "can not be able to compile Action Class" Watch "can not be able to compile Action Class" New topic
Author

can not be able to compile Action Class

Jaffery Rab
Ranch Hand

Joined: Jan 18, 2002
Posts: 36
Hi
I am very new Struts programming, infact trying to run my first struts application, but can not be able to compile Action class. Code is :

getting error message:

My form bean look like this and its already compile and I put .class file in classes directory alredy:

Web.xml look like this:

struts-config.xml look like this:

and I don't know what to put in hansen.playgound.ApplicationResources thats why I left it blank, nothing is in there.
Please help me!!
Darryl A. J. Staflund
Ranch Hand

Joined: Oct 06, 2002
Posts: 303
Hi there,
Did you specify your classpath for javac?
Darryl
Jaffery Rab
Ranch Hand

Joined: Jan 18, 2002
Posts: 36
My Class path look like this:
C:\j2sdk1.4.1_03\lib\servlet.jar;C:\jakarta-tomcat-4.1.24\common\lib\servlet.jar;C:\jakarta-tomcat-4.1.24\common\lib\struts.jar

also I am compiling it from my <CATALINA_HOME>/webapps/struts-blank/WEB-INF/src directory.
How can I set classpath for javac ??
Darryl A. J. Staflund
Ranch Hand

Joined: Oct 06, 2002
Posts: 303
Hi there,
Although you include the JAR files in your classpath, you also need to include the path of your src directory. If you do not, the Javac compiler will not be able to locate and hence compile the Java source files in the src directory. It is not enough that you issue the javac command from within the src directory -- unless the src directory is included in your class path.
You can include the src directory in your classpath by appending it to your CLASSPATH environment variable or by passing it to the javac compiler using the '-classpath' attribute.
Just type 'javac' on a source line by itself for information on the proper syntax on how to do this.
Cheers,
Darryl
[ June 06, 2003: Message edited by: Darryl A. J. Staflund ]
Jaffery Rab
Ranch Hand

Joined: Jan 18, 2002
Posts: 36
You can include the src directory in your classpath by appending it to your CLASSPATH environment variable or by passing it to the javac compiler using the '-classpath' attribute.

I am sorry I am bothering you too much..........
How can I do this can you gimme an example?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can not be able to compile Action Class