You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Erik Price <ep...@ptc.com> on 2003/01/13 20:59:56 UTC
importing a bean into a JSP required?
Hi,
First let me thank everyone who has helped me already. I really
appreciate it.
Also, I noticed something that contradicts what I originally thought
about the way that JSPs worked with beans a la the <jsp:useBean> tag.
From trial and error, I've discovered that I get a class not found
error in a stacktrace if I don't explicitly import my bean in the JSP
using this code:
<%@ page import="UserBean" %>
but my original understanding, from reading "Core Servlets", was that
this was not required if the bean is located in WEB-INF/classes or in a
JAR file in WEB-INF/lib. In my case the simple UserBean.class file is
correctly located in WEB-INF/classes. But simply using <jsp:useBean
id="stringKeyStoredInSessionOnPreviousPage" class="UserBean"
scope="session"/> isn't working unless I use the import JSP directive as
mentioned above.
Am I wrong here? (Probably. Thanks for your input.)
Erik
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>