Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion SiteMesh 3 breaks Struts 2 FileUploadInterceptor?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard L. Burton III  
View profile  
 More options Feb 3 2011, 10:10 am
From: "Richard L. Burton III" <mrbur...@gmail.com>
Date: Thu, 3 Feb 2011 10:10:47 -0500
Local: Thurs, Feb 3 2011 10:10 am
Subject: Re: SiteMesh 3 breaks Struts 2 FileUploadInterceptor?

mrburton (at) gmail.com would work.

On Thu, Feb 3, 2011 at 10:06 AM, xtian <ghz...@gmail.com> wrote:
> I wrote a small webapp. How do I send it over?

> Apparently the behavior of struts with sitemesh 3 depends on the
> invocation sequence of the filters.

> This sequence works with sitemesh not with struts upload:

> struts-prepare
> sitemesh
> struts-execute

> This sequence works with struts upload, not with sitemesh:

> sitemesh
> struts-prepare
> struts-execute

> On Feb 3, 3:34 pm, "Richard L. Burton III" <mrbur...@gmail.com> wrote:
> > If you can send over a test case, I'll look into it what's going on.

> > On Thu, Feb 3, 2011 at 9:30 AM, xtian <ghz...@gmail.com> wrote:
> > > Since I upgraded from SiteMesh 2 to SiteMesh 3, my upload forms
> > > stopped working.
> > > Removing the SiteMesh filter brings them back to life, so there must
> > > be a connection...

> > > I'm using Struts2 FileUploadInterceptor. The interceptor is ignoring
> > > my upload requests.
> > > The relevant code is the following:

> > >    public String intercept(ActionInvocation invocation) throws
> > > Exception {
> > >        ActionContext ac = invocation.getInvocationContext();
> > >        HttpServletRequest request = (HttpServletRequest)
> > > ac.get(ServletActionContext.HTTP_REQUEST);
> > >        if (!(request instanceof MultiPartRequestWrapper)) {
> > >            if (LOG.isDebugEnabled()) {
> > >                LOG.debug(... very long debug message here ...)
> > >            }
> > >            return invocation.invoke();
> > >        }

> > > When I click on my upload button, I get the debug message saying that
> > > the action in bypassed.
> > > That's because SiteMesh 3 is replacing the MultiPartRequestWrapper
> > > with org.sitemesh.webapp.contentfilter.HttpServletRequestFilterable

> > > Any way to fix this?
> > > I tried with the Apache ActionContextCleanUp filter as suggested here
> > > (http://osdir.com/ml/java.appfuse.user/2007-02/msg00096.html) but it
> > > breaks everything.

> > --
> > -Richard L. Burton III

--
-Richard L. Burton III

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.