Re: strange request scope behaviour

2004-08-25 Thread Craig McClanahan
On 25 Aug 2004 20:42:31 +0800, Sebastian Ho
<[EMAIL PROTECTED]> wrote:
> hi
> 
> I am having this strange behavior that I don't understand.
> I keep having 'experiments' in my request scope when I don't think I put
> that in.
> 

There is no code in Struts that ever creates a request scope attribute
named "experiments" on its own.  That has to be coming either from
code in one of your actions actually storing it there, or because
you've decared "experiments" to be a form bean and then executed an
action that references that form bean name somewhere (which would
trigger the normal Struts behavior to create the form bean for you).

Craig

> I only paste the important codes here because they are too big.
> 
> ---
> In my action class :
> ---
> 
>  if(request.getAttribute("experiments") == null)
>   {
> System.out.println("experiments is null");
>   }
> return mapping.findForward("success");
> 
> ---
> Above prints out 'experiments is null' so it is not in the scope
> 
> 
> struts-config
> ---
> 
>  scope="request"
> type="sg.edu.astar.flamingo.web.proteomics.action.NewProjectAction"
> parameter="action" attribute="project">
>redirect="true"/>
> 
> 
> 
> In CreateExperiment.jsp
> 
>  
>   
> 
> 
>   
> 
> 
> 
> The JSP prints out error.project.title! when there should not be in the
> request scope..
> ---
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: strange request scope behaviour

2004-08-25 Thread Sebastian Ho
I searched high and low for 'experiments' but can't find it anywhere. I
am changing from request to session. Can't afford to spent too much time
on it..my dateline is coming.

Thanks Jim

Sebastian Ho

On Thu, 2004-08-26 at 00:09, Jim Barrows wrote:
> > -Original Message-
> > From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 25, 2004 5:43 AM
> > To: Struts Users Mailing List
> > Subject: strange request scope behaviour
> > 
> > 
> > hi
> > 
> > I am having this strange behavior that I don't understand.
> > I keep having 'experiments' in my request scope when I don't 
> > think I put
> > that in. 
> 
> 
> I don't see it here, but here are the things to look for:
> 1) Somewhere in the action/form/jsp request.setAttribute("expirements", blah);
> 2) Forward 
> 3) A link that sets experiments.
> 
> It would shock me to find out that the word experiments is anywhere in the struts 
> release code, however you could try searching the entire struts code base for it.
> 
> 
> > 
> > I only paste the important codes here because they are too big.
> > 
> > ---
> > In my action class :
> > ---
> > 
> >  if(request.getAttribute("experiments") == null) 
> >   {
> > System.out.println("experiments is null");
> >   }
> > return mapping.findForward("success");
> > 
> > ---
> > Above prints out 'experiments is null' so it is not in the scope
> > 
> > 
> > struts-config
> > ---
> > 
> >  > input="CreateProject.jsp"
> > scope="request"
> > type="sg.edu.astar.flamingo.web.proteomics.action.NewProjectAction"
> > parameter="action" attribute="project">
> >> redirect="true"/>
> > 
> > 
> > 
> > In CreateExperiment.jsp
> > 
> >  
> >   
> > 
> > 
> >   
> > 
> > 
> > 
> > The JSP prints out error.project.title! when there should not 
> > be in the
> > request scope..
> > ---
> > 
> > 
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: strange request scope behaviour

2004-08-25 Thread Jim Barrows


> -Original Message-
> From: Sebastian Ho [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 25, 2004 5:43 AM
> To: Struts Users Mailing List
> Subject: strange request scope behaviour
> 
> 
> hi
> 
> I am having this strange behavior that I don't understand.
> I keep having 'experiments' in my request scope when I don't 
> think I put
> that in. 


I don't see it here, but here are the things to look for:
1) Somewhere in the action/form/jsp request.setAttribute("expirements", blah);
2) Forward 
3) A link that sets experiments.

It would shock me to find out that the word experiments is anywhere in the struts 
release code, however you could try searching the entire struts code base for it.


> 
> I only paste the important codes here because they are too big.
> 
> ---
> In my action class :
> ---
> 
>  if(request.getAttribute("experiments") == null) 
>   {
> System.out.println("experiments is null");
>   }
> return mapping.findForward("success");
> 
> ---
> Above prints out 'experiments is null' so it is not in the scope
> 
> 
> struts-config
> ---
> 
>  input="CreateProject.jsp"
> scope="request"
> type="sg.edu.astar.flamingo.web.proteomics.action.NewProjectAction"
> parameter="action" attribute="project">
>redirect="true"/>
> 
> 
> 
> In CreateExperiment.jsp
> 
>  
>   
> 
> 
>   
> 
> 
> 
> The JSP prints out error.project.title! when there should not 
> be in the
> request scope..
> ---
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



strange request scope behaviour

2004-08-25 Thread Sebastian Ho
hi

I am having this strange behavior that I don't understand.
I keep having 'experiments' in my request scope when I don't think I put
that in. 

I only paste the important codes here because they are too big.

---
In my action class :
---

 if(request.getAttribute("experiments") == null) 
  {
System.out.println("experiments is null");
  }
return mapping.findForward("success");

---
Above prints out 'experiments is null' so it is not in the scope


struts-config
---


  



In CreateExperiment.jsp

 
  


  



The JSP prints out error.project.title! when there should not be in the
request scope..
---





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]