Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Putting a helloword.java code to run on Sun Java Web Server

807567Dec 23 2007 — edited Jan 8 2008
Hello,

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...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2008
Added on Dec 23 2007
2 comments
110 views