I can't see anywhere in the documentation (I've only had a quick skim
of it) that says not mapping the Struts dispatcher to /* can be
dangerous.. the only example I can see is if you're using Struts
interceptors/actions for webapp security - in which case hitting a
servlet directly might mean there's no session information to validate
the user. That's a trivial matter, though.
I routinely map the Struts dispatcher filter to a set of URLs, usually
when I'm mixing Struts actions with servlets like yourself.
Just map the dispatcher where you need it.
On 16 May 2009, at 17:27, jesse crossley wrote:
i have a similar problem, in that i need to disable the struts2 file
interceptor as well.
i have a pre-existing webapp that already does FileUpload from html to
servlets, but now that i've introduced struts2 into my application,
file
uploads and, in fact, any form set to use the multipart mime type
regardless
of whether a file is attached or not and regardless of destination
will now
fail once it hits my servlets.
logging indicates that the JakartaMultiPartRequest is handling the
form post
before my servlet gets to it. of course, the reason i even have
this log
instead of a great big exception is because i configured my webapp's
struts.properties to use it:
struts
.multipart
.parser
=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
and i'm sure that the reason the multipart parser is taking a crack
at the
file posting is because my web.xml allows the struts2 dispatcher to be
mapped to /*, as shown in all struts2 example apps i've come across:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-
class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
i only need struts under /security, but documentation indicates that
not
using /* can be dangerous, but doesn't indicate in what way or what
else to
do about it.
does anyone know how to disable it through struts configuration?
alternatively, if i'm in a Servlet and i hafta use the struts2
multipart
handling, how can i get at the params that the JakartaMultiPartRequest
parses out? are they put in the session or context somewhere?
thanks,
jesse crossley
--
View this message in context:
http://www.nabble.com/File-upload-%28jupload%29--how-to-disable-struts2%27-fileupload-interceptor--tp23534189p23575425.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org