Putting a helloword.java code to run on Sun Java Web Server
807567Dec 23 2007 — edited Jan 8 2008Hello,
Given helloworld.jsp:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<HTML>");
out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
out.println("<BODY>");
out.println("<H1>Hello World</H1>");
out.println("Today is: " + (new java.util.Date().toString()) );
out.println("</BODY></HTML>");
} // doGet
} // HelloWorld
How can I put this code to run on Sun Java System Web Server, how to compile this ? what and how to put in the webserver document and how to access it ?
Thanks for verbose and basic information about this, appreciated...