[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
<BEAN> tag problem
Does anybody succeed with <bean> tag ?
I'm experiencing a strange problem with GnuJSP and this bean tag, when
I'm trying to use it in a whole session (e.g., in several JSP pages).
Say, I have 2 pages (login.jsp and enter.jsp).
In login.jsp, I'm creating a bean named dba :
<bean name="dba" type="DatabaseAccess" scope="session"></bean>
In enter.jsp, there is :
<bean name="dba" type="DatabaseAccess" create="no"></bean>
as I hope to use the DB connection established in login.jsp.
When enter.jsp is processed, I have the following message :
500 JSP run-time error
The JSP page you requested could not be served because the following
error(s) occured:
Could not access bean dba of type DatabaseAccess
just if the "dba" object was not stored in the session context...
But if I remove the <bean> tag from enter.jsp, and write instead :
DatabaseAccess dba =
(DatabaseAccess) request.getSession(true).getValue("dba");
(hacked after a look at GnuJSP generated code), I have
the instance of DatabaseAccess, and I cant use it !
Any clue, somebody ?
-Franck.