Oupps one more remarks,

         WITH implements SingleThreadModel and JServSSI,
        instead of being called one, the method init is called each time the 
servlet is called !!
        The example below show it well, try it ;P

        Greg

______________________________ Reply Separator _________________________________
Subject: Re: Funny Problem with Apache Jserv SSI
Author:  Gregory.GRUZ ([EMAIL PROTECTED]) at internet
Date:    2/17/99 8:43 PM


     
     Hello,
     
     Here a simple example so that you could try if you have the same 
     problem.
     The problem seems to come from 
     -> implements SingleThreadModel
     
     * WITHOUT implements SingleThreadModel
     -> works fine if I call the servlet directly AND when I call the 
     servlet using SSI
     
     * WITH implements SingleThreadModel
     -> works fine with jserv
     -> works only 10 TIMES with JSerSSI
     
     Strange no ?? ;-))))
     
     Bye, Greg
     
     
     -------- TestSSI.java ---------------- 
     import java.io.*; 
     import javax.servlet.*; 
     import javax.servlet.http.*; 
     
     public class TestSSI extends HttpServlet implements SingleThreadModel 
     { 
         int connections;
     
         public void init(ServletConfig conf) throws ServletException 
         {
        super.init(conf);
        connections = 0;
         }
     
         public void service(HttpServletRequest req, HttpServletResponse 
     res)
         throws IOException{ 
        //Get a channel to the Web browser, so we can send output 
             ServletOutputStream out = res.getOutputStream(); 
             res.setContentType("text/html"); // Required for HTTP
     
             out.println("<HTML><HEAD><TITLE>Servlets 101</TITLE></HEAD>"); 
             out.println("Say hello to Java Servlet Programming, ");
        //out.println(req.getParameter("userName")); 
             out.println("<p>You are caller number "); 
             connections++; 
             out.println(Integer.toString(connections)); 
             out.close(); //Close the output stream
         }
     }
     
------------- TestSSI.jhtml -------------------- 
<HTML>
 <HEAD>
  <TITLE>Test Page for Apache Installation on Web Site</TITLE>
 </HEAD>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
 <BODY
  BGCOLOR="#FFFFFF"
  TEXT="#000000"
  LINK="#0000FF"
  VLINK="#000080"
  ALINK="#FF0000"
 >
     
<SERVLET CODE="TestSSI.class">
<!-- <PARAM NAME="userName" value="Greg"> --> 
Problem 
</SERVLET>
 </BODY>
</HTML>
 ______________________________ Reply Separator 
 _________________________________
 Subject: Re: Funny Problem with Apache Jserv SSI
 Author:  zeller ([EMAIL PROTECTED]) at internet 
 Date:    2/17/99 6:38 PM
     
     
     
 Hi Greg,
 |     JServ works just fine but I have a problem with SSI.
 |     My servlet is working ok for exactly *10 TIMES* ;-), then 
 I have the |     error :
 |     java.lang.ClassNotFoundException: can't find servlet named 
 |     "DynamicDropDownMenu"
This is really strange. Does it only happen with this particular servlet 
or do other servlets suffer from this behaviour as well ?
are there any exceptions before ?
     
ciao,
  -hen
---
Henner Zeller                                 [EMAIL PROTECTED]
 PGP pub key [77F75B39]: finger [EMAIL PROTECTED] 
     
 "One difference between SuSE and Red Hat is that the former operates in a
  country where people don't sue each other over coffee being too hot."
                                                            Linus Torvalds
     
     
     
     
---------------------------------------------------------------- 
To subscribe:        [EMAIL PROTECTED] 
To unsubscribe:      [EMAIL PROTECTED] 
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]
     
     
     
---------------------------------------------------------------- 
To subscribe:        [EMAIL PROTECTED] 
To unsubscribe:      [EMAIL PROTECTED] 
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]



----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to