× 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.



--
[ Picked text/plain from multipart/alternative ]

To use an error page JSP  (having: <%@ page isErrorPage="true" %>),  there
needs to be another JSP (having something like: <%@ page errorPage
="/jsp/errorpage.jsp" %>).  That way, when an exception occurs there is
implicit JSP-to-JSP exception initialization that the error page JSP
expects.  This implicity exception initialization is not being performed
when you use a servlet to forward to the JSP.  By changing it to errorPage
="/jsp/errorpage.jsp", this just defines an error page for the JSP in case
an unexpected exception occurs.

(Understanding the stack dump related to the 500 error may help confirm
whether this is actually the case.  Is the 500 error (nullpointer
exception) related to trying to access an exception object that was not
implicitly initialized?)




                      P.Goovaerts@Clipp
                      er.Be                    To:       java400-l@midrange.com
                      Sent by:                 cc:
                      java400-l-admin@m        Subject:  Re: Errorhandling 
after HttpSession time-out / JspWithNoErrorPageException
                      idrange.com


                      11/05/01 01:57 AM
                      Please respond to
                      java400-l






Solved!

I used the 'real' errorpage.  It seems one cannot use the page with
     '<%@ page isErrorPage="true" %>'
definition from a servlet?

I created a copy of this one and changed this directive to
     '<%@ page errorPage="/jsp/errorpage.jsp" %>'

Now it works.  However, can someone explain me
why this is?  In other words :
Why can't I use the 'error'-page from within a servlet?
A JSP is also a servlet and when an error occur's it
also sends the 'errorpage'...




                    "Art Smet"
                    <smet@us.ibm.com>         To:
java400-l@midrange.com
                    Sent by:                  cc:
                    java400-l-admin@mi        Subject:     Re:
Errorhandling after HttpSession time-out /
                    drange.com                JspWithNoErrorPageException


                    02/11/2001 15:57
                    Please respond to
                    java400-l






--
[ Picked text/plain from multipart/alternative ]

The 500 shows some kind of unexpected exception occured on the server side,
so you should take a look at stdout/stderr to see more evidence of what the
problem is, it may shed more light on what is wrong.  If you cant tell what
is wrong from stdout/stderr pls repost, I suggest showing the entire stack
dump you see rom stdout/stderr (if there is a stack dump) as well as the
entire stack dump you see at the browser.





                      P.Goovaerts@Clipp
                      er.Be                    To:
JAVA400-L@midrange.com
                      Sent by:                 cc:
                      java400-l-admin@m        Subject:  Errorhandling
after HttpSession time-out / JspWithNoErrorPageException
                      idrange.com


                      11/02/01 04:04 AM
                      Please respond to
                      java400-l













  I want to send 'errorpage.jsp' when an Http-session time-out occurs. I
  tried to capture this in my controlling-servlet but when time-out occurs,
  a standard error-text is shown with errorcode 500 etc...

  Why is my errorpage.jsp not comming up properly? The stderr.logfile shows
  the additional info I send, so I'm sure it's executed. The path is also
  correct.

  1) Here is how i do this
  if (session.isNew())
  {
  System.out.println("Previous session was Time-out");
  System.out.println(" Desplay errorscreen ");
  httppage = "/jsp/errorpage.jsp";
  getServletConfig().getServletContext
  ().getRequestDispatcher(httppage).forward(req, res);
  return;
  }
  ...
  rest of processing

  2) This is a piece of the error i receive in webserver:
  com.sun.jsp.JspWithNoErrorPageException: Server caught unhandled
  exception from JSP ?errorpage.jsp!

  3) This is a piece of the errorpage I receive in the browser:
  Error 500
  An error has occured while processing request:
  http://www.clippersupport.be:2031/servlet/com.clipper.servlets.FQControll
  er
  Message: Server caught unhandled exception from servlet [invoker]: Server
  caught unhandled exception from servlet
  [com.clipper.servlets.FQController]: Server caught unhandled exception
  from servlet [jsp10]: Server caught unhandled exception from JSP
  [errorpage.jsp]

  Target Servlet: invoker
  StackTrace:
  -------------------------------------------------------------------------
  -------
  Root Error-1: null

  java.lang.NullPointerException
  ...
  rest of page







_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



--

_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.




_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
or email: JAVA400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.