× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey Gurus,

I am running into a problem with my ssi's when I try to deal with them in my wdsc test environment. I have a very simple .shtml file and I am calling a servlet to display times in different zones but I dont think the WDSC test environment(server) supports ssi. I might be wrong about this but wanted to verify before jumping to any conclusions. Here is the code to my .shtml file and my servlet. Any help is much appreciated.

Mike.

.shtml
=====

<HTML>
<HEAD><TITLE>Times!</TITLE></HEAD>
<BODY>
The current time here is:
<SERVLET CODE=/Servlets/CurrentTime>
</SERVLET>
<P>
The current time in London is:
<SERVLET CODE=/Servlets/CurrentTime>
<PARAM NAME=zone VALUE=GMT>
</SERVLET>
<P>
And the current time in New York is:
<SERVLET CODE=/Servlets/CurrentTime>
<PARAM NAME=zone VALUE=EST>
</SERVLET>
<P>
</BODY>
</HTML>

servlet code
========

public class CurrentTime extends HttpServlet
{

        public void doGet(HttpServletRequest req, HttpServletResponse resp)
                throws ServletException, IOException
        {

       PrintWriter out = resp.getWriter();
       resp.setContentType("text/html");

       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));



        }

}

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar ? get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.