Hi,
I executed the Hello World servlet successfully on JAVA web server 2.0 and
Windows 98. But when I tried to execute SSI- CurrentTime servlet which is
given in the O'Reilly book, I am not getting the Time from HTML page.It just
displays only the following text:
The current time here is:
The current time in London is:
The current time in NEW YORK is:
The servlet code is as follows:
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("<HTNML>");
out.println("<HEAD><TITLE>HELLO WORLD</TITLE></HEAD>");
out.println("<BODYL>");
out.println("<BIGL>HELLO WORLD</BIG>");
out.println("</BODY></HTML>");
}
}
The HTML page is:
<html>
<head>
<title> Times</title>
</head>
<body>
The current time here is:
<SERVLET CODE=CurrentTime>
</SERVLET>
<p>
The current time in London is:
<SERVLET CODE=CurrentTime>
<PARAM NAME=zone VALUE=GMT>
</SERVLET>
<P>
The current time in NEW YORK is:
<SERVLET CODE=CurrentTime>
<PARAM NAME=zone VALUE=EST>
</SERVLET>
<P>
</BODY>
</HTML>
Your help will be greatly appreciated.
Thanx,
Naran.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html