tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Diaz <>
Subject servlet and jsp application scope variable problem (easy?)
Date Wed, 07 Aug 2002 02:58:52 GMT
in my servlet I create an application scope object and
set its values. While -in- the servlet these values
are correct. However, when I reference the application
scope object in a JSP page (or in another servlet) all
of its values are ZERO, not what I set them to.

I -can- set the values of these object with JSP pages
and the values STAY but I am using MVC and I don't
want to give control to my JSP pages.

I am having NO problems with my session variables.

code in the SERVLET file:

import myDomain.base.*;
ServletContext context = getServletContext();
Max TwcMax = new myDomain.base.Max();
TwcMax.setbookmarks (99);
context.setAttribute("myDomain.base.Max", TwcMax);

Code in the JSP FILE:
<jsp:useBean id="TwcMax" scope="application"
class="myDomain.base.Max" />
<%     TwcMax.setbookmarks(44);   %>

I think that's all the code you need, I hope this is
an easy problem, many thanks in advance for your
Richard Diaz


Do You Yahoo!?
Yahoo! Health - Feel better, live better

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message