More stuff....

Here is the source code to a servlet that RUNS under Tomcat 4.0 but does
NOT RUN under Tomcat 4.0.1.

I can email (upone request) a zip file containing the full directory
structure (with class file) that can be unzipped an placed directly
under "webapps".  Put it in Tomcat 4.0 and it runs, put it under Tomcat
4.0.1 and it does not.

Of course - tc 4.0 and tc 4.0.1 are in totally separate directories, can
run all example servlets AND any servlet without the session "stuff" in
it.  Also of course I never try to run TC4 and 4.01 at the same time.
On Solaris 8, this runs under tc 4.0.1 without error.  Only on Win 2000
does this error happen.

I have also re-downloaded Tomcat for Windows and done a binary compare
between what I have and the latest - and they are identical.

It really does seem as if TC 4.0.1 on W2K has a problem with the
"catalina.StandardSesionFacade" incorrectly calling
"catalina.StandardSession" instead of "javax.servlet.http.HttpSession",
but I do not know why this happens on W2K but NOT on Solaris.

I am not a newbie in this particular "stuff", and have done my
homework.  I would appreciate a reply from someone in the Tomcat
developer community.

Cheers,

-Richard

=================the code======================
/**
 * Title: SessionTestServlet
 *
 * Description: Session Test Servlet - duplicate Catalina Session error
 *
 * Copyright: Copyright (c) 2001, Huntrods Consulting Inc.
 *
 * Company: Huntrods Consulting Inc.
 * Author: Richard S. Huntrods
 * Version: 1.0
 * Date: December 13, 2001
 *
 * @author Richard S. Huntrods
 * @version 1.0
 */

package testing;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class SessionTestServlet extends HttpServlet {
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    public void doGet(HttpServletRequest request, HttpServletResponse
response)
                throws ServletException, IOException {

        doPost(request, response);
    }

    public void doPost(HttpServletRequest request, HttpServletResponse
response)
                throws ServletException, IOException {

        response.setContentType ("text/html");
        StringBuffer buffer = new StringBuffer();

        HttpSession session = request.getSession(true);
        if(session != null) {
            session.setAttribute("name", "Richard Huntrods");
            session.setAttribute("company", "Huntrods Consulting Inc.");

        }

        buffer.append("<HTML>\n");
        buffer.append("<HEAD>\n");
        buffer.append(" <META NAME=\"GENERATOR\" CONTENT=\"WinEdit -
Richard S. Huntrods\">\n");
        buffer.append(" <TITLE>Session Test</TITLE>\n");
        buffer.append("</HEAD>\n");
        buffer.append("<BODY BGCOLOR=\"#99cccc\"\">\n");
        buffer.append(" <P><CENTER><B><I><H2>\n");
        buffer.append("Session Test\n");
        buffer.append(" </H2></I></B></CENTER></P>\n");
        buffer.append("</BODY>\n");
        buffer.append("</HTML>\n");

        PrintWriter out = response.getWriter();
        out.println(buffer);
        out.close();
    }

    public String getServletInfo() {
        return "SessionTestServlet Information";
    }
}
=============================================





--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to