When I use jsp:usebean and my code throws a specific Exception, this
exception is never seen by the JSP file.  Instead, I get a general Exception
from the bean tags.

Can anyone tell me if there's a way to throw a specific exception from bean
code that can be seen from the JSP?

Here's an example,
in my code I have to use:

<jsp:useBean id="user" class="com.loudeye.mod.ordermanager.User"
scope="session"/>
<jsp:setProperty name="user" property="*" />
<jsp:setProperty name="user" property="response" value="<%= response %>"  />
<% user.setRequest(request); %>


When I'd rather use:
<jsp:useBean id="user" class="com.loudeye.mod.ordermanager.User"
scope="session"/>
<jsp:setProperty name="user" property="*" />
<jsp:setProperty name="user" property="response" value="<%= response %>"  />
<jsp:setProperty name="user" property="request" value="<%= request %>"  />

but if I use this second form, any exceptions thrown by the setProperty are
"lost" -- not presented as the specific error they were.


Is this just the way it is?  Is there a better way to throw exceptions when
setting properties on beans?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to