You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ke...@msg.de on 2001/08/22 12:29:15 UTC
Problem with templates(?)
Hello,
I am using weblogic server 5.1 (sp8) and struts 1.0 with jdk1.3.0_02
In a startup.jsp I'm putting a bean into the session and then I forward to
the login page where I want to use the bean.
If I do this the very first time after server startup, the constructor for
the bean I am using is called twice (!!).
After startup.jsp I enter the page login.jsp which calls the constructor
another time and my settings are gone :-(
This happens only if the pages (_startup.java, _login.java) are not
generated (only the first time). If I enter the startup
page later, then the constructor is only called once (if I have a new
client) or never if the client remains the same.
This is the expected behavior.
Does anybody have similar experiences??
Do I have to change settings in weblogic.properties or web.xml ??? Is
this a struts problem??
What makes matters more complicated I use templates: the login page uses
the struts template and fills the page with
sidebar.jsp and loginContent.jsp. In the loginContent.jsp I include a
header.jsp page which uses the bean I initialized
in startup.jsp.
In the logs I can see the constructor-log just after the following lines:
Mi Aug 22 10:52:11 GMT+02:00 2001:<I> <WebAppServletContext-HID> resolving
taglib uri '/WEB-INF/struts-bean.tld' to tagl
ib-location /WEB-INF/struts-bean.tld:
Mi Aug 22 10:52:11 GMT+02:00 2001:<I> <WebAppServletContext-HID> resolving
taglib uri '/WEB-INF/struts-html.tld' to tagl
ib-location /WEB-INF/struts-html.tld:
Mi Aug 22 10:52:12 GMT+02:00 2001:<I> <WebAppServletContext-HID> resolving
taglib uri '/WEB-INF/struts-logic.tld' to tag
lib-location /WEB-INF/struts-logic.tld:
[DEBUG] 2001-08-22 10:52:13,633 navigation.navigation <<->> constructor
call
I added logs after every jsp:usebean -tag but these logs are documenting
that no constructor is called, if the bean is already in the session.
So I don't know where this constructor call really comes from?? I couldn't
find a class.instantiate in the _template.java
nor in other pages where it shouldn't happen...
Any help is appreciated.