I have a jsp with a bean tag at top (before any output). If the bean tag
throws an
exception, it calls a RequestDispatcher.forward() to an Error Handling .jsp.
For some reason, the JSP returns control back to the calling jsp(servlet)
after
it runs. Is this expected behariour?
ie:
<jsp:useBean id="db" scope="page" class="DbBean" />
<%
  db.callmethod(); [exception gets throw in this method]
%>
<HTML>
Shouldn't reach here, but does?

Also, before I call the forward() in the Bean, I set a few request
parameters. I get null values for these in my ErrorHandler jsp?

example:
   (from the Bean)
       RequestDispatcher dispatcher =
application.getRequestDispatcher("/ErrorHandler.jsp");
        req.setAttribute("error-code","103");
        dispatcher.forward(req, res);

(now in ErrorHandler.jsp)

%
  String error_code = (String)request.getParameter("error-code");
out.println(error_code); [This gives me "null"]
  %>

Any ideas what I'm doing wrong?  I'm using OrionServer....

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to