aspose file tools*
The moose likes Servlets and the fly likes Weblogic 7.0 supports SSI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Weblogic 7.0 supports SSI" Watch "Weblogic 7.0 supports SSI" New topic
Author

Weblogic 7.0 supports SSI

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
Hi,
I am trying to workout Server Side Includes in weblogic 7.0 application server. But it is not working. Whether am i missing something in the xml file.
Here is the code:
<-------------------------------------CurrentTime ------------------------->
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 request , HttpServletResponse response)
throws ServletException,IOException
{
System.out.println("Inside the doGet method");

PrintWriter out = response.getWriter();
response.setContentType("Text/html");

Date date = new Date();
DateFormat df = DateFormat.getInstance();

String zone = request.getParameter("zone");

if (zone != null)
{
TimeZone tz = TimeZone.getTimeZone(zone);
df.setTimeZone(tz);
}
out.println(df.format(date));
}
}
<----------------------------------CurrentTime.shtml ---------------------->
<HTML>
<HEAD>
<TITLE> TIMES!</TITLE>
</HEAD>
<BODY>
The Current Time here is:
<Servlet code= CurrentTime>
</Servlet>
<BR>
The Current Time in London is--
<Servlet code= CurrentTime>
<PARAM NAME="zone" value = "GMT">
</Servlet>
<BR>
The Current Time in New York is --
<Servlet code= CurrentTime>
<PARAM NAME="zone" value = "EST">
</Servlet>
<BR>
</BODY>
</HTML>
<---------------------------------- output------------------------------>
The Current Time here is:
The Current Time in London is--
The Current Time in New York is --
Please let me know whether i am missing something in the configuration.
Thanks & Regards,
M.S.Raman
 
Consider Paul's rocket mass heater.
 
subject: Weblogic 7.0 supports SSI