I get no output from my servlet when using the <SERVLET> tag in a .jhtml
file. I've installed the ApacheJSSI.jar following the instructions. My
servlet is as simple as it can get:
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class CurrentTime extends HttpServlet
{
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
{
res.setContentType("text/html");
PrintWriter out = res.getWriter();
Date date = new Date();
DateFormat df = DateFormat.getInstance();
String zone = req.getParameter("zone");
if (zone != null)
{
TimeZone tz = TimeZone.getTimeZone(zone);
df.setTimeZone(tz);
}
out.println(df.format(date));
}
The .jhtml is pretty simple also:
<html>
<head>
<!-- header - edit "Data/yourHtmlHeader" to customize -->
<!-- contents - edit "EventHandlers/Html file/onCreate" to customize -->
<meta name="generator" content="ModelWorks IDE">
<title>Times!</title>
</head>
<body>
The current time here is:
<SERVLET CODE=../servlets/CurrentTime.class>
Not supported
</SERVLET>
<P>
The current time in London is:
<SERVLET CODE=../servlets/CurrentTime.class>
<PARAM NAME=zone VALUE=GMT>
Not supported
</SERVLET>
<P>
The current time in New York is:
<SERVLET CODE=../servlets/CurrentTime.class>
<PARAM NAME=zone VALUE=EST>
Not supported
</SERVLET>
<P>
</body>
</html>
I feel the servlet is being called because none of the "Not Supported" show
up in the resulting .html. I feel I'm missing something simple. Can
anybody give me a clue.
Craig A. Ritchie
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]