Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

useBean action from JSP 1.2 to 2.0

Jason Novotny

2004-05-04

Replies:


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.

  Thanks, Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.