Thanks, I did notice that and fixed it after my first posting but it didn't help the
original problem I was having.  Subsequent conversations with various people (thanks!)
indicate that the problem was related to the fact that the redirect was creating a new
context because of the URL I was using, thus the beans were not there (or rather, new
ones were being created).  I hadn't realized at the time how new contexts were created
on the fly just by using a URL request like that.

Thanks for all your help!

Beth

Arun Thomas wrote:

> Beth,
>
> Two items, assuming that this is a cut and paste from your code....
>
> Regarding the application scope "systembean" object:
>
>         > getServletContext().setAttribute("systembean", systemBean);
>         > <jsp:useBean id="systemBean" scope="application" class="beans.SystemBean"
> />
>
> Note that the id you use in the usebean tag is not the same as the string
> you use as
> the key when adding the item to the servlet context.  (The 'b' in
> "systembean" is
> capitalized in one case.)  The JSP tag, therefore, is probably creating a
> new instance
> of the class and adding it to the servlet context.  That is why none of the
> values are
> present.
>
> It not quite as clear what may be going wrong with the bean added to the
> session.
> I would suggest, however, that when creating the session within the
> scriptlet in the
> JSP, you use request.getSession(false) - this will help to identify if the
> JSP is
> using a preexisting session (it should be) or creating a new one altogether.
>
> -AMT

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to