http://issues.apache.org/bugzilla/show_bug.cgi?id=26444

-Tim

Jason Novotny wrote:

Hmm... so is that new in JSP 2.0? I thought the expected behavior was to first pull it out of the request and fail only if it can't find it and it has no-arg constructor or is interface or abstract.


Thanks, Jason

Tim Funk wrote:

The class attribute passed into <jsp:useBean> *must* have a public no-arg constructor.


-Tim


Jason Novotny wrote:


Hi,


In upgrading my webapp from using Tomcat 4 (JSP 1.2) to Tomcat 5 (JSP 2.0) I'm seeing some errors in some of the JSP pages. I have jsp actions like:

<jsp:useBean id="locale" class="java.util.Locale" scope="request"/>

where in the Java code prior to invoking the JSP I put the "locale" Locale object in the request e.g. request.setAttribute("locale", myLocale);

This works fine under Tomcat 4 but now in Tomcat 5 it complains with some class instantiation exception. Is there something special I need to do? Also will it be backward compatible with JSP 1.2? It seems using the following scriplet does work:

<% Locale locale = request.getAttribute("locale") %>

but I would rather use the useBean syntax.

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to