wood burning stoves 2.0*
The moose likes Struts and the fly likes how to compile my struts files in command prompt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to compile my struts files in command prompt" Watch "how to compile my struts files in command prompt" New topic
Author

how to compile my struts files in command prompt

len kumar
Greenhorn

Joined: Sep 21, 2009
Posts: 4
Hi ,

I am new to struts i want to compile my struts files in command prompt.

how to do that and how to set the classpath using command prompt.


can anybody help me out please....

Thanks in Advance.


Thanks & Regards,
Len.

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9313
    
  17

Hi Len, welcome to javaranch.

you can set the classpath as


You'll need to include the struts jar into the classpath (depending upon the version of struts, the needed jars will vary). I would recommend that you use an IDE (eclipse or netbeans etc) or a build script (ant or maven)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
len kumar
Greenhorn

Joined: Sep 21, 2009
Posts: 4
Hi,

I have set classpath given below:

I am doing some mistake but unable to idetify please help me out .............


C:\strutsprac-war\WEB-INF\classes>set classpath=.;struts.jar;servlet-api.jar;

C:\strutsprac-war\WEB-INF\classes>javac -d . *.java

Output:
C:\strutsprac-war\WEB-INF\classes>javac -d *.java
EmployeeAction.java:2: package javax.servlet does not exist
import javax.servlet.ServletException;
^
EmployeeAction.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
EmployeeAction.java:14: cannot find symbol
symbol : class HttpServletRequest
location: class org.EmployeeAction
public ActionForward perform (ActionMapping mappings,ActionForm form,HttpServletRequest req, HttpServletResponse res)throws ServletException,IOException{
^
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The jars are in your current directory?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to compile my struts files in command prompt