Here is an interceptor that I use to manipulate the HttpResponse
object. You can do the same for the HttpRequest.
public String intercept(ActionInvocation actionInvocation) throws Exception {
HttpServletResponse resp = ServletActionContext.getResponse();
resp.setHeader(Pragma, no-cache);
//
would have never thought to cast it to a
ServletActionContext (although hopefully I will next time). I'm using the
ThreadLocal approach right now for brevity. Is there any performance
difference or other difference between the two approaches that I should be
aware of?
Yoni Amir-2 wrote:
Here
Your action should implement the ServletRequestAware interface, then
the Servlet Config Interceptor, which is active by default, does the
rest.
http://struts.apache.org/2.x/docs/servlet-config-interceptor.html
Yoni
On 5/29/07, yitzle [EMAIL PROTECTED] wrote:
I want to store session
Hello,
I am working on my first struts application, and I was wondering about
design patterns for communicating between actions.
For example, I have actions A and B. A runs first and creates some data (e.g.,
a session bean). When B runs, it needs to verify that the data is actually
available.
The latest struts 2, I think it's 2.0.6 ... and 'hely' was a typo for
'help', of course :)
On 5/27/07, Mansour [EMAIL PROTECTED] wrote:
Which version of struts are you using?
Yoni Amir wrote:
Hello,
I am working on my first struts application, and I was wondering about
design patterns
5 matches
Mail list logo