struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Aumont <vincent.aum...@vsl.ca>
Subject Re: Disabling Struts multipart request handling (1.1b) [Bug?]
Date Mon, 08 Apr 2002 17:26:57 GMT
To answer my own question:

I need to disable the Struts multipart request handling  because I want to use my
own handler that does not  the Struts interface. It seems like we lost this
functionality when the multipartClass property was moved out of the ActionServlet
class.

I patched RequestUtils.getMultipartHandler and it works now.

I'll enter a bug report in bugzilla and submit my patch.

-Vincent.



Vincent Aumont wrote:

> Hi,
>
> It used to be (pre-1.0.2) that setting the ActionServlet's multipartClass
> property to "none" (in web.xml) would prevent struts from handling multipart
> requests.
>
> I had a look at the 1.1b code and at the nightly version and it seems that this
> functionality has been removed, although the documentation says the contrary.
>
> It seems to me that the setMultipartClass method in  ControllerConfig, which is
> currently:
>
>     public void setMultipartClass(String multipartClass) {
>         if (configured) {
>             throw new IllegalStateException("Configuration is frozen");
>         }
>         this.multipartClass = multipartClass;
>     }
>
> should actually be:
>
>     public void setMultipartClass(String multipartClass) {
>         if (configured) {
>             throw new IllegalStateException("Configuration is frozen");
>         }
>        if ((String multipartClass != null) and "none".equals(multipartClass)) {
>                 this.multipartClass = null;
>       } else {
>         this.multipartClass = multipartClass;
>       }
>     }
>
> Has anybody encountered the same problem?
>
> Thanks,
>
> -Vincent.
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


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


Mime
View raw message