Hello,

I have developed a web application using the JSP model 2 architecture.  That
means one central servlet dispatching requests to JSP using beans generated
by the central servlet.

The problem is that when forwarding from the servlet to the JSP, I got a Dr
Watson error.  The code looks like code sample 1 below.  However, if the jsp
is accessed directly before being the target of a forward, I have no error
if then a forward is done.

So my question is : Is there some properties file I should modify so that
the jsp are "initialized" and are accessible through the request dispatcher
forward method ??

I am using Orion on a window NT platform.

The message received when it goes wrong is:
 *** panic: GC failed to enter single threaded mode (possibly undetached
threads?), error code = -1

Thanks for any pointers you could provide me.
Bertrand Legros
 


Code Sample 1
*******************     
try {
        Class c = Class.forName(helperBeanName);
        hb = (HelperBean)c.newInstance();
        // send the parameter to HelperBean
        results = hb.execute(parms);
        // results should contain target(JSP) and Vector for target
        session.putValue("INResults",results);
        String url = (String)results.get("JSPTarget");
        logWriter.log("Target received :"+url,LogWriter.INFO);
        ServletContext sc = getServletContext();
        RequestDispatcher rd = sc.getRequestDispatcher(url);
        if (rd != null) {
                logWriter.log("Forwarding to :"+url,LogWriter.INFO);
                rd.forward(req,res);
        } else {
                error(new Exception("rd null !!!"));
                return;
        }
        // send redirect give the same problem 
        //res.sendRedirect(url);
        return;
} catch (ClassNotFoundException cne) {                  
        error(cne);     
} catch (InstantiationException ie) {
        error(ie);
} catch (IllegalAccessException iae) {
        error(iae);
} catch (HelperBeanException hbe) {
        error(hbe);
}
Code of the target jsp
**************************
<%@ page session="true" import="java.util.*" errorPage="error.jsp" %>
<HTML>

<LINK rel="stylesheet" type="text/css" href="../BugTrackerStyleSheet.css"/>

<HEAD>
        <TITLE>Bug Tracker Home Page </TITLE>
</HEAD>
<BODY>
        <% 
        Hashtable in = (Hashtable)session.getValue("INResults");
        session.putValue("UserID",in.get("UserID"));
        %>
        <DIV id=head class="header">
        Welcome to bug tracker!
        </DIV>
        
        <DIV id=menu class="menu">
        <A
HREF="BugTrackerServlets.SmartServlet?Transaction=REPORTBUG">Report a bug or
a proposed enhancement </A>
        <BR>
        <A
HREF="BugTrackerServlets.SmartServlet?Transaction=UPDATESTATUS">Update the
status of an item</A>
        
        </DIV>
</BODY>
</HTML>
                

Reply via email to