struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Lee <plasma...@gmail.com>
Subject Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?
Date Fri, 27 May 2011 12:32:31 GMT
Dave is right that it suggests its bad design but if you really need it you
can get your action to implement servletrequestaware:

http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/interceptor/package-summary.html

Might be better to create a threadlocal in an interceptor to store t
relevant info in a dto and access it that way-it seems a more cross cutting
concern. You definitely don't want pass t request to your service/dao
layers!
 On 27 May 2011 13:10, "Dave Newton" <davelnewton@gmail.com> wrote:

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message