Sanjiv Jivan wrote:
>
> Do you have a multipartResolver the the one below bean defined?
> Yes, I do have that bean in my action-servlet.xml... I found the
> problem... I didn´t have the multipart/form-data in my form.jsp and that
> cause the error with the cast.
>
> <form:form commandName="picture" method="post" action="editPicture.html"
> id="pictureForm"
> enctype="multipart/form-data">
>
>
> <bean id="multipartResolver" class="
> org.springframework.web.multipart.commons.CommonsMultipartResolver">
> <property name="maxUploadSize">
> <value>1000000000</value>
> </property>
> </bean>
>
>
> On 4/16/07, hquinn <[EMAIL PROTECTED]> wrote:
>>
>>
>> Greetings everyone!
>> I´m having a problem with the MultipartHttpServletRequest when I try to
>> save
>> an object [Picture] I do´t know where is the problems because I´m doing
>> the
>> same thing with another objectFormController
>> This is the error I get when I try to save...
>> [action].invoke(250) | Servlet.service() para servlet action lanzó
>> excepción
>> java.lang.ClassCastException:
>> org.acegisecurity.wrapper.SavedRequestAwareWrapper cannot be cast to
>> org.springframework.web.multipart.MultipartHttpServletRequest
>> at
>> mx.edu.um.carz.webapp.action.PictureFormController.onSubmit(
>> PictureFormController.java:60)
>>
>> This is the part of my formController where I try to save an object and I
>> cast the request to a MultipartHttpServletRequest...
>> MultipartHttpServletRequest multipartRequest =
>> (MultipartHttpServletRequest)
>> request;
>> if(multipartRequest.getFile("image") != null &&
>> multipartRequest.getFile("image").getSize() > 0){
>>
>> picture.setImageType(multipartRequest.getFile("image").getContentType());
>> picture.setImage(multipartRequest.getFile("image").getBytes());
>> }
>>
>> Any ideas???
>> --
>> View this message in context:
>> http://www.nabble.com/Problems-with-MultipartHttpServletRequest-tf3587532s2369.html#a10025612
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Problems-with-MultipartHttpServletRequest-tf3587532s2369.html#a10036494
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]