I don't think so, but I am really just using the example code provided in the book. I am including the code below. Also, when I specified the classpath at the command line, I was able to build it successfully:
This works: javac HelloServlet.java -classpath c:\Tomcat\common\lib\servlet.jar
This doesn't: javac HelloServlet.java
I am confused as to why it is not working without specifying the classpath when building, because I have this same exact path in my CLASSPATH variable.
Thanks
Billy
---------- Code --------------- import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
/** Simple servlet used to test server. * <P> * Taken from More Servlets and JavaServer Pages * from Prentice Hall and Sun Microsystems Press, * http://www.moreservlets.com/. * © 2002 Marty Hall; may be freely used or adapted. */
public class HelloServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String docType =
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
"Transitional//EN\">\n";
out.println(docType +
"<HTML>\n" +
"<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1>Hello</H1>\n" +
"</BODY></HTML>");
}
}_________________________________________________________________
Instant message in style with MSN Messenger 6.0. Download it now FREE! http://msnmessenger-download.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
