I'm a JSP starter and encountering a problem I can not understand.
I want to impelent an application-wide data storage.
On the first call of my JSP everything works correct. But on any following calls there seem to be problems loading testClass:
Everything between <jsp:useBean ...> and </jsp:useBean> is just ignored ( this is tested ).
No error message is printed in the browser or in the GlassFish logs. I'm just getting my empty page.
What am I missing?
Bear Bibeault wrote:Why do you have anything in the body of the useBean action?
The useBean action tag should be self-closed except in the case where it will enclose setProperty actions to initialize bean properties (itself a rather deprecated practice).
In fact I'm doing some getProperty-Requests in the body.
However...this should be executed every time the JSP is requested.
As Bear said, the only thing that should be in the body are setProperty tags.
These will be called only when the bean is instanciated (which is once if you use scope appplication.
The useBean tag does some interesting things. It's a good idea to read the section on it in the JSP spec.
There is a link in my signature.