struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@struts.apache.org
Subject [Apache Struts Wiki] Updated: ForwardingWithDifferentParameter
Date Tue, 08 Jun 2004 20:23:52 GMT
   Date: 2004-06-08T13:23:52
   Editor: 148.87.1.171 <>
   Wiki: Apache Struts Wiki
   Page: ForwardingWithDifferentParameter
   URL: http://wiki.apache.org/struts/ForwardingWithDifferentParameter

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -84,4 +84,15 @@
 
 So now I can direct my user to view their post reply in the topic page.
 
+I have encountered a similar problem. The above solution works with some limitations
+1. It somewhat breaks the mapping abstraction, and creates additional burden to encode the
URL.
+2. It does not seem to work if the action to forward to (in the above case, viewTopic) expects
the a parameter that is also specified in the original request. 
+
+The other solutions I tried include:
+1. Use a redirect ActionForward (it solves issue 2).
+2. Overwrite the request attribute - ActionForm mapping logic so that the logic first looks
at request context attribute before looking at request parameter. With this approach, one
can then set additional attributes using request.setAtrribute(...); 
+
+However, it seems that solution 2 is not a typical soltuion. Any feedback?
+
+
 

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


Mime
View raw message