you can configure fileUpload Interceptor to allow these predefined types http://cwiki.apache.org/WW/file-upload-interceptor.html
<interceptor-ref name="fileUpload"> <param name="allowedTypes"> image/png,image/gif,image/jpeg </param> </interceptor-ref> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html If there is a reason for supporting setContentType method in FilterDispatcher then suggest the reasons in JIRA https://issues.apache.org/struts/secure/IssueNavigator.jspa?reset=true&pid=10030&fixfor=21861 Martin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Fri, 17 Oct 2008 06:33:24 -0700 > From: [EMAIL PROTECTED] > Subject: Re: FilterDispatcher - ContentType not set, how to set in to > text/html? > To: user@struts.apache.org > > --- On Fri, 10/17/08, Torsten Krah wrote: > > Answering to myself - although i am confused that this is > > not the default when delivering jsps: > > AFAIK it is; I've never had to set the content type. > > Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ Stay organized with simple drag and drop from Windows Live Hotmail. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008