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
> ---------------------------------------
> <action path="/CreateExperiment" forward="/CreateExperiment.jsp"/>
> <action name="projectForm" path="/NewProject" input="CreateProject.jsp"
> scope="request"
> type="sg.edu.astar.flamingo.web.proteomics.action.NewProjectAction"
> parameter="action" attribute="project">
>       <forward name="success" path="/CreateExperiment.do"
> redirect="true"/>
>     </action>
> 
> ----------------------------------------
> In CreateExperiment.jsp
> ----------------------------------------
>  <logic:present name="experiments" scope="request">
>       <bean:message key="error.project.title"/>
>     </logic:present>
>     <logic:present name="experiments" scope="session">
>       <bean:message key="error.project.id"/>
>     </logic:present>
> 
> --------------------------------------------
> 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]

Reply via email to