L
Len
HI;
I am stuck with the example code I downloaded from the JAva web site.
HelloServlet.java. Compiling with javac , and getting all errors about
not recognizing symbols. Like statement javax.servet.http.*; HttpServlet;doGet()
It seems the javax don't recognize any of this. I attached the code.
Thnks
Leon
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>");
}
}
I am stuck with the example code I downloaded from the JAva web site.
HelloServlet.java. Compiling with javac , and getting all errors about
not recognizing symbols. Like statement javax.servet.http.*; HttpServlet;doGet()
It seems the javax don't recognize any of this. I attached the code.
Thnks
Leon
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>");
}
}