Hi all,
I have a java file named Ch1Servlet.java under project1/src directory
there is classes directory project1/classes and web.xml under src directory
project1/src directory.
Now to compile i have to give %javac -classpath /your path/tomcat/common/lib/servlet-api.jar -d classes src/Ch1Servlet.java
What is this your path ? Tomcat 5.0 is installed in C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib with servlet-api.jar
Please help me out.
Best Regards
Taton
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class Ch1Servlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
PrintWriter out = response.getWriter();
java.util.Date today = new java.util.Date();
out.println(""+"
"+"
HF\'s Chapter 1 Servlet
"+"
"+today+""+"");
}
}
2006-09-06
21:57:56
·
2 answers
·
asked by
K Ban
2
in
Computers & Internet
➔ Programming & Design