what's I'm doing wrong?
Struts can't catch exceptions thrown by the JSP. This is one reason
(among many) why I would design something like this to do the
database work in an action and deliver only data to the JSP.
Joe
At 4:40 PM +0100 8/1/05, Tremal Nailk wrote:
Hello, I'm trying to capture exceptions generated inside my jsp pages.
I wrote a piece of code like this into my jsp:
<%
......
DatabaseException de = new DatabaseException("Test Exception for the
error page");
throw de;
.......
%>
I added these pieces in my web.xml and struts-config.xml
----------------------------web.xml-----------------------------
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.jsp?code=exception</location>
</error-page>
----------------------------web.xml-----------------------------
----------------------------struts-config.xml-----------------------------
<global-exceptions>
<exception key="error.application"
path="/error.jsp?code=exception" type="java.lang.Exception"/>
</global-exceptions>
----------------------------struts-config.xml-----------------------------
I'm using the sslext SecureTilesRequestProcessor defined as:
<controller
processorClass="org.apache.struts.action.SecureTilesRequestProcessor"
/>
I'm not able to capture the exception thrown by the jsp page. The result is:
[ServletException in:/jsp/admin/groupListBody.jsp] Test Exception for
the error page'
written on the browser page, instead of the page generated by error.jsp
thanks in advance
--
TREMALNAIK
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"Narrow minds are weapons made for mass destruction" -The Ex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]