You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Julia Yang <jy...@graviton.com> on 2001/09/07 20:36:26 UTC

Help Error run Struts in VAJ 4 "cant remove Attributes from request scope" remain

Hi, Geoff and Mark and all

Thank you for answer my question on how to use struts in VAJ 
I got it run but with a error
Server caught unhandled exception from servlet [jsp]: cant remove
Attributes from request scope
I followed the e-mail Geoff sent out on 8/21/2001 with

Replace the following lines in the doEndTag() method in the FormTag
class:

     pageContext.removeAttribute(Constants.BEAN_KEY,
PageContext.REQUEST_SCOPE);
     pageContext.removeAttribute(Constants.FORM_KEY,
PageContext.REQUEST_SCOPE);

with the following:

     pageContext.getRequest().removeAttribute(Constants.BEAN_KEY);
     pageContext.getRequest().removeAttribute(Constants.FORM_KEY);

The problem remains, is there anything else I need do ? 

Julia



-----Original Message-----
From: David Corbin [mailto:dcorbin@imperitek.com] 
Sent: Friday, September 07, 2001 9:26 AM
To: struts-user@jakarta.apache.org
Subject: Re: bean:define, bean:write

For the record, my mistake was in use the "scope" attribute instead of
the
"toScope" attribute.


----- Original Message -----
From: "Keith Bacon" <ke...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, September 06, 2001 1:38 PM
Subject: Re: bean:define, bean:write


> My guess is that jsp:define creates it if not there
> but struts bean:define doesn't.
>
>
> --- David Corbin <dc...@imperitek.com> wrote:
> > I thought that bean:define takes care of that....
> > ----- Original Message -----
> > From: "Keith Bacon" <ke...@yahoo.com>
> > To: <st...@jakarta.apache.org>
> > Sent: Thursday, September 06, 2001 11:18 AM
> > Subject: Re: bean:define, bean:write
> >
> >
> > > Is it because you haven't done a
> > >
> > > request.putAttribute("pageTitle", yourObject);
> > >
> > > in your ActionForm?
> > >
> > > Keith.
> > >
> > >
> > > --- David Corbin <dc...@imperitek.com> wrote:
> > > > Why does this jsp fragment generate an exception
> > > >
> > > > javax.servlet.jsp.JspException: Cannot find bean pageTitle in
> > scope
> > > > request
> > > >
> > > > --cut--
> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > > > <bean:define id="pageTitle" value="foobar" scope="request"/>
> > > >
> > > > <HTML>
> > > >     <HEAD>
> > > >          <TITLE><bean:write name="pageTitle"
> > > > scope="request"/></TITLE>
> > > >     </HEAD>
> > > > . . .
> > > >
> > > > --cut--
> > > >
> > > > Thanks
> > > > David Corbin
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get email alerts & NEW webcam video instant messaging with Yahoo!
> > Messenger
> > > http://im.yahoo.com
> > >
> > >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger
> http://im.yahoo.com
>
>