Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to compile my struts files in command prompt

 
len kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)...
 
len kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The jars are in your current directory?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic