Re: Error - MultipartIterator: no multipart request data sent

2002-01-20 Thread Ted Husted

I can't help much with the multipart stuff, but redirect does not clear
the request object per se, but actually issues a HTTP redirect to the
client. The client then turns around and makes a new request for the
specified URI. Since this is now a new request, it gets a new request
object. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/


Antony Stace wrote:
> 
> Hi
> 
> This is an old post that follows.  I have found the same problem with Struts
> 1.01.  Is this behaviour a bug or is it how Struts is meant to work?
> Also can someone please tell me what setting
> the value of redirect="true" does besides clearing the request attributes.
> 
> Cheers
> 
> Tony
> 
> >Hello,
> >
> >It seems to work like that. But as you wrote, if the redirect attribute is set
> >to 'true', it is cleaning all the attributes in request. I had put my
> >attributes in session instead of request.
> >Anyway, Thanks a lot.
> >
> >Regards
> >Nuray
> >
> >-Original Message-----
> >From: mikael.eriksson [mailto:[EMAIL PROTECTED]]
> >Sent: Montag, 2. Juli 2001 00:18
> >To: struts-user
> >Subject: Re: Error - MultipartIterator: no multipart request data sent
> >
> >
> >Hello
> >
> > I noticed the same problem when moving to 1.0. It seems that
> >the requesthandler notices that the request is a multi-part and
> >tries to find the multi-part data, even when the request are
> >already handled and you are only forwarding to the next
> >action. (I only got the problem when going to another action.)
> >
> > The way I handled it was to set redirect="true" in struts-config.xml
> >for the action that I forwarded to, this made the multi-part info
> >go away from the request (and all other parameters too of course,
> >so if you are expecting request parameters in the next action this
> >will not work.)
> >
> > I guess this could be fixed in the code too, maybe by having the request
> >reader setting a request attribute so that it knows the next time
> >that it already has gotten the data. But I did not go deep enough
> >into the code to know if that is feasible or not.
> >
> > Regards
> > Mikael
> >
> >
> >[EMAIL PROTECTED] wrote:
> >
> >> Hi everbody,
> >>
> >> I am writing a program that needs to process form data. I have an uploadForm
> >> (that is an insatance of org.apache.struts.action.ActionForm). I have no
> >> problem with uploading a file via this form. After uploading the file, I am
> >> executing a couple of procedures inside the uploadAction(instance of
> >> org.apache.struts.action.Action) and afterwards forwarding the request to
> >> another page. While it is forwarding the request, it gives the following
> >error:
> >>
> >> javax.servlet.ServletException: MultipartIterator: no multipart request data
> >> sent
> >> java.lang.Throwable(java.lang.String)
> >> java.lang.Exception(java.lang.String)
> >> javax.servlet.ServletException(java.lang.String)
> >> void org.apache.struts.upload.MultipartIterator.parseRequest()
> >>
> >> org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
> >> , int, long, java.lang.String)
> >> void
> >> org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
> >> .http.HttpServletRequest)
> >> void org.apache.struts.util.RequestUtils.populate(java.lang.Object,
> >> java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
> >> void
> >> org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
> >> ActionForm, org.apache.struts.action.ActionMapping,
> >> javax.servlet.http.HttpServletRequest)
> >> void
> >> org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
> >> uest, javax.servlet.http.HttpServletResponse)
> >> void
> >> com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
> >> letRequest, javax.servlet.http.HttpServletResponse)
> >> void
> >> org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
> >> est, javax.servlet.http.HttpServletResponse)
> >> void
> >> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> >> javax.servlet.http.HttpServletResponse)
> >> void
> >> javax.servlet.http.HttpServ

Re: Error - MultipartIterator: no multipart request data sent

2002-01-16 Thread Antony Stace

Hi 

This is an old post that follows.  I have found the same problem with Struts
1.01.  Is this behaviour a bug or is it how Struts is meant to work?  
Also can someone please tell me what setting
the value of redirect="true" does besides clearing the request attributes.

Cheers

Tony




>Hello,
>
>It seems to work like that. But as you wrote, if the redirect attribute is set 
>to 'true', it is cleaning all the attributes in request. I had put my 
>attributes in session instead of request.
>Anyway, Thanks a lot. 
>
>Regards
>Nuray
>
>-Original Message-
>From: mikael.eriksson [mailto:[EMAIL PROTECTED]]
>Sent: Montag, 2. Juli 2001 00:18
>To: struts-user
>Subject: Re: Error - MultipartIterator: no multipart request data sent
>
>
>Hello
>
> I noticed the same problem when moving to 1.0. It seems that
>the requesthandler notices that the request is a multi-part and
>tries to find the multi-part data, even when the request are
>already handled and you are only forwarding to the next
>action. (I only got the problem when going to another action.)
>
> The way I handled it was to set redirect="true" in struts-config.xml
>for the action that I forwarded to, this made the multi-part info
>go away from the request (and all other parameters too of course,
>so if you are expecting request parameters in the next action this
>will not work.)
>
> I guess this could be fixed in the code too, maybe by having the request
>reader setting a request attribute so that it knows the next time
>that it already has gotten the data. But I did not go deep enough
>into the code to know if that is feasible or not.
>
> Regards
> Mikael
>
>
>[EMAIL PROTECTED] wrote:
>
>> Hi everbody,
>>
>> I am writing a program that needs to process form data. I have an uploadForm
>> (that is an insatance of org.apache.struts.action.ActionForm). I have no
>> problem with uploading a file via this form. After uploading the file, I am
>> executing a couple of procedures inside the uploadAction(instance of
>> org.apache.struts.action.Action) and afterwards forwarding the request to
>> another page. While it is forwarding the request, it gives the following 
>error:
>>
>> javax.servlet.ServletException: MultipartIterator: no multipart request data
>> sent
>> java.lang.Throwable(java.lang.String)
>> java.lang.Exception(java.lang.String)
>> javax.servlet.ServletException(java.lang.String)
>> void org.apache.struts.upload.MultipartIterator.parseRequest()
>>
>> org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
>> , int, long, java.lang.String)
>> void
>> org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
>> .http.HttpServletRequest)
>> void org.apache.struts.util.RequestUtils.populate(java.lang.Object,
>> java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
>> void
>> org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
>> ActionForm, org.apache.struts.action.ActionMapping,
>> javax.servlet.http.HttpServletRequest)
>> void
>> org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
>> uest, javax.servlet.http.HttpServletResponse)
>> void
>> com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
>> letRequest, javax.servlet.http.HttpServletResponse)
>> void
>> org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
>> est, javax.servlet.http.HttpServletResponse)
>> void
>> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
>> javax.servlet.http.HttpServletResponse)
>> void
>> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
>> javax.servlet.ServletResponse)
>> void
>> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
>> org.apache.tomcat.core.Response)
>> void
>> org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
>> org.apache.tomcat.core.Response)
>> void
>> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
>> org.apache.tomcat.core.Response)
>> void
>> org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ
>> est, javax.servlet.ServletResponse)
>> void
>> org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac
>> tion.ActionForward, org.apache.struts.action.ActionMapping,
>> org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
>> java

RE: Re: Error - MultipartIterator: no multipart request data sent

2001-07-02 Thread nuray . baskal

Hello,

It seems to work like that. But as you wrote, if the redirect attribute is set 
to 'true', it is cleaning all the attributes in request. I had put my 
attributes in session instead of request.
Anyway, Thanks a lot. 

Regards
Nuray

-Original Message-
From: mikael.eriksson [mailto:[EMAIL PROTECTED]]
Sent: Montag, 2. Juli 2001 00:18
To: struts-user
Subject: Re: Error - MultipartIterator: no multipart request data sent


Hello

 I noticed the same problem when moving to 1.0. It seems that
the requesthandler notices that the request is a multi-part and
tries to find the multi-part data, even when the request are
already handled and you are only forwarding to the next
action. (I only got the problem when going to another action.)

 The way I handled it was to set redirect="true" in struts-config.xml
for the action that I forwarded to, this made the multi-part info
go away from the request (and all other parameters too of course,
so if you are expecting request parameters in the next action this
will not work.)

 I guess this could be fixed in the code too, maybe by having the request
reader setting a request attribute so that it knows the next time
that it already has gotten the data. But I did not go deep enough
into the code to know if that is feasible or not.

 Regards
 Mikael


[EMAIL PROTECTED] wrote:

> Hi everbody,
>
> I am writing a program that needs to process form data. I have an uploadForm
> (that is an insatance of org.apache.struts.action.ActionForm). I have no
> problem with uploading a file via this form. After uploading the file, I am
> executing a couple of procedures inside the uploadAction(instance of
> org.apache.struts.action.Action) and afterwards forwarding the request to
> another page. While it is forwarding the request, it gives the following 
error:
>
> javax.servlet.ServletException: MultipartIterator: no multipart request data
> sent
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> javax.servlet.ServletException(java.lang.String)
> void org.apache.struts.upload.MultipartIterator.parseRequest()
>
> 
org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
> , int, long, java.lang.String)
> void
> 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
> .http.HttpServletRequest)
> void org.apache.struts.util.RequestUtils.populate(java.lang.Object,
> java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
> void
> 
org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
> ActionForm, org.apache.struts.action.ActionMapping,
> javax.servlet.http.HttpServletRequest)
> void
> 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
> uest, javax.servlet.http.HttpServletResponse)
> void
> 
com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
> letRequest, javax.servlet.http.HttpServletResponse)
> void
> 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
> est, javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
> void
> 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ
> est, javax.servlet.ServletResponse)
> void
> 
org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac
> tion.ActionForward, org.apache.struts.action.ActionMapping,
> org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> void
> 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
> uest, javax.servlet.http.HttpServletResponse)
> void
> 
com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
> letRequest, javax.servlet.http.HttpServletResponse)
> void
> 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
> est, javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.Http

Re: Error - MultipartIterator: no multipart request data sent

2001-07-01 Thread Mikael Eriksson

Hello

 I noticed the same problem when moving to 1.0. It seems that
the requesthandler notices that the request is a multi-part and
tries to find the multi-part data, even when the request are
already handled and you are only forwarding to the next
action. (I only got the problem when going to another action.)

 The way I handled it was to set redirect="true" in struts-config.xml
for the action that I forwarded to, this made the multi-part info
go away from the request (and all other parameters too of course,
so if you are expecting request parameters in the next action this
will not work.)

 I guess this could be fixed in the code too, maybe by having the request
reader setting a request attribute so that it knows the next time
that it already has gotten the data. But I did not go deep enough
into the code to know if that is feasible or not.

 Regards
 Mikael


[EMAIL PROTECTED] wrote:

> Hi everbody,
>
> I am writing a program that needs to process form data. I have an uploadForm
> (that is an insatance of org.apache.struts.action.ActionForm). I have no
> problem with uploading a file via this form. After uploading the file, I am
> executing a couple of procedures inside the uploadAction(instance of
> org.apache.struts.action.Action) and afterwards forwarding the request to
> another page. While it is forwarding the request, it gives the following error:
>
> javax.servlet.ServletException: MultipartIterator: no multipart request data
> sent
> java.lang.Throwable(java.lang.String)
> java.lang.Exception(java.lang.String)
> javax.servlet.ServletException(java.lang.String)
> void org.apache.struts.upload.MultipartIterator.parseRequest()
>
> org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
> , int, long, java.lang.String)
> void
> org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
> .http.HttpServletRequest)
> void org.apache.struts.util.RequestUtils.populate(java.lang.Object,
> java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
> void
> org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
> ActionForm, org.apache.struts.action.ActionMapping,
> javax.servlet.http.HttpServletRequest)
> void
> org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
> uest, javax.servlet.http.HttpServletResponse)
> void
> com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
> letRequest, javax.servlet.http.HttpServletResponse)
> void
> org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
> est, javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
> void
> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ
> est, javax.servlet.ServletResponse)
> void
> org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac
> tion.ActionForward, org.apache.struts.action.ActionMapping,
> org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> void
> org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
> uest, javax.servlet.http.HttpServletResponse)
> void
> com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
> letRequest, javax.servlet.http.HttpServletResponse)
> void
> org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
> est, javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest,
> javax.servlet.http.HttpServletResponse)
> void
> javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> javax.servlet.ServletResponse)
> void
> org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request,
> org.apache.tomcat.core.Response)
> void
> org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Req
> uest, org.apache.tomcat.co

Error - MultipartIterator: no multipart request data sent

2001-06-30 Thread nuray . baskal

Hi everbody,

I am writing a program that needs to process form data. I have an uploadForm 
(that is an insatance of org.apache.struts.action.ActionForm). I have no 
problem with uploading a file via this form. After uploading the file, I am 
executing a couple of procedures inside the uploadAction(instance of 
org.apache.struts.action.Action) and afterwards forwarding the request to 
another page. While it is forwarding the request, it gives the following error:

javax.servlet.ServletException: MultipartIterator: no multipart request data 
sent
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.String)
void org.apache.struts.upload.MultipartIterator.parseRequest()

org.apache.struts.upload.MultipartIterator(javax.servlet.http.HttpServletRequest
, int, long, java.lang.String)
void 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(javax.servlet
.http.HttpServletRequest)
void org.apache.struts.util.RequestUtils.populate(java.lang.Object, 
java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest)
void 
org.apache.struts.action.ActionServlet.processPopulate(org.apache.struts.action.
ActionForm, org.apache.struts.action.ActionMapping,
javax.servlet.http.HttpServletRequest)
void 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
uest, javax.servlet.http.HttpServletResponse)
void 
com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
letRequest, javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
est, javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRequ
est, javax.servlet.ServletResponse)
void 
org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.ac
tion.ActionForward, org.apache.struts.action.ActionMapping, 
org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletReq
uest, javax.servlet.http.HttpServletResponse)
void 
com.ubs.cristal.actions.CristalActionServlet.process(javax.servlet.http.HttpServ
letRequest, javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRequ
est, javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Req
uest, org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apach
e.tomcat.service.TcpConnection, java.lang.Object [])
void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object 
[])
void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
void java.lang.Thread.run()

Anybody had this error before or has an idea?

Thanks...

Nuray