tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Ramaekers <cry...@pandora.be>
Subject JSP : Can not retrieve Object stored from servlet into session
Date Mon, 16 Oct 2000 22:23:23 GMT
Hi,

I'm using RH6.2, jdk1.2.2, Apache 1.3.14, Tomcat 3.2 Beta6

In my servlet i'm storing a User object into a session :

HttpSession session = request.getSession(true);
User user = new User(userid, password);
session.setAttribute("user", user);

This servlet compiles without a problem and the User.class is stored
in the $(TOMCAT_HOME)/webapps/test/WEB-INF/classes folder
so that the servlet can find it.

In my JSP i do the following :

<jsp:usebean Class="User" id="user" scope=session"/>

But when i try to retrieve the JSP i get the following error :

org.apache.jasper.JasperException: Unable to compile
class for
JSP/usr/local/tomcat/work/localhost_8080%2Fgedas/_0002fjsp_0002fmenu_0002ejspmenu_jsp_0.java:61:

Class jsp.User not found.
                 User user =
(User)session.getAttribute("user");
                 ^
/usr/local/tomcat/work/localhost_8080%2Fgedas/_0002fjsp_0002fmenu_0002ejspmenu_jsp_0.java:61:

Class jsp.User not found.
                 User user = (User)session.getAttribute("user");

Am i doing something wrong ?
Or is this a bug ?
Any can help me on this ?

Thanks

Werner Ramaekers





Mime
View raw message