struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederik Minatchy <frederi...@yahoo.fr>
Subject How to pass HTTPRequest between two JSP ?
Date Sun, 28 Feb 2010 23:26:28 GMT
Hello...

Since a few days I am working with Struts 2. (2.1.6)
I am facing a big problem with HttpRequest and JSPs.

Well... I have to forward a HTTPRequest from page1.jsp to page2.jsp

So... How can I pass HTTPRequest attribute betwen 2 pages?

Here is a part my web.xml file :

...
<filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
	<filter-mapping>
	<filter-name>struts2</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>    
...


the struts.xml file :

...

<action name="bnf-detail" class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction">
        	<result name="success">/pages/bnf/administration/detailBnf.jsp</result>
		</action>
 
 
 
		<action name="bnf-detail_modification" class="fr.bnf.platon.bnf.actions.ConsultationBnfDetailAction"
method="modificationSubmit">
        	<result name="success">/pages/bnf/administration/detailBnf.jsp</result>
		</action>
...

and a part of the action java file (which implementents RequestAware):

  public String execute() throws Exception
   {
      request.put("test", 58);
      return SUCCESS;
    }
 
   public String modificationSubmit() throws TechniqueException, FonctionnelleException
   {
      request.get("test"); // is null
      editMode = true;
      return SUCCESS;
   }
 


So... How can I pass the request attribute from on page to an other?



      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message