Re: problem with file upload

2015-09-11 Thread Johannes Geppert
Does it not work with the point notation? Not sur if this works when you
are working with list of object.



Best Regards

Johannes

#
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep


2015-09-11 11:38 GMT+02:00 Yaragalla Muralidhar :

> That is what i am saying. The docs shows how to upload files to action
> class but my requirement is different. Please read the problem carefully.
> and do help me.
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
>
> *http://yaragalla.blogspot.in/ *
>
> On Fri, Sep 11, 2015 at 3:03 PM, Johannes Geppert 
> wrote:
>
> > Have you already checked the docs?
> > https://struts.apache.org/docs/file-upload.html
> >
> >
> > Best Regards
> >
> > Johannes
> >
> > #
> > web: http://www.jgeppert.com
> > twitter: http://twitter.com/jogep
> >
> >
> > 2015-09-11 11:31 GMT+02:00 Yaragalla Muralidhar <
> yaragallamur...@gmail.com
> > >:
> >
> > > Hi ,
> > >   I know how to upload a file into the action class but my requirement
> is
> > > different. I have a list of pojos where each pojo contains a field
> called
> > > file.
> > >
> > > for example:-
> > >
> > > public class Pojo{
> > >
> > > private int pk;
> > > private File file;
> > >
> > >//setters and getters
> > > }
> > >
> > > In my action class:-
> > >
> > > public class MyAction{
> > >
> > >private List pojos;
> > >//setter getter
> > > }
> > >
> > > from my jsp when i select a file and say upload it has to set to the
> Pojo
> > > "file" property. how do i do that? I have complete idea of how to
> upload
> > > directly to the action class but now it is different. the file has to
> go
> > > and sit in the Pojo class file property. How can i do this? Please help
> > me?
> > >
> > >
> > >
> > > *Thanks and Regards,*
> > > Muralidhar Yaragalla.
> > >
> > > *http://yaragalla.blogspot.in/ *
> > >
> >
>


Re: problem with file upload

2015-09-11 Thread Yaragalla Muralidhar
That is what i am saying. The docs shows how to upload files to action
class but my requirement is different. Please read the problem carefully.
and do help me.

*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ *

On Fri, Sep 11, 2015 at 3:03 PM, Johannes Geppert  wrote:

> Have you already checked the docs?
> https://struts.apache.org/docs/file-upload.html
>
>
> Best Regards
>
> Johannes
>
> #
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
>
> 2015-09-11 11:31 GMT+02:00 Yaragalla Muralidhar  >:
>
> > Hi ,
> >   I know how to upload a file into the action class but my requirement is
> > different. I have a list of pojos where each pojo contains a field called
> > file.
> >
> > for example:-
> >
> > public class Pojo{
> >
> > private int pk;
> > private File file;
> >
> >//setters and getters
> > }
> >
> > In my action class:-
> >
> > public class MyAction{
> >
> >private List pojos;
> >//setter getter
> > }
> >
> > from my jsp when i select a file and say upload it has to set to the Pojo
> > "file" property. how do i do that? I have complete idea of how to upload
> > directly to the action class but now it is different. the file has to go
> > and sit in the Pojo class file property. How can i do this? Please help
> me?
> >
> >
> >
> > *Thanks and Regards,*
> > Muralidhar Yaragalla.
> >
> > *http://yaragalla.blogspot.in/ *
> >
>


problem with file upload

2015-09-11 Thread Yaragalla Muralidhar
Hi ,
  I know how to upload a file into the action class but my requirement is
different. I have a list of pojos where each pojo contains a field called
file.

for example:-

public class Pojo{

private int pk;
private File file;

   //setters and getters
}

In my action class:-

public class MyAction{

   private List pojos;
   //setter getter
}

from my jsp when i select a file and say upload it has to set to the Pojo
"file" property. how do i do that? I have complete idea of how to upload
directly to the action class but now it is different. the file has to go
and sit in the Pojo class file property. How can i do this? Please help me?



*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ *


Re: problem with file upload

2015-09-11 Thread Johannes Geppert
Have you already checked the docs?
https://struts.apache.org/docs/file-upload.html


Best Regards

Johannes

#
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep


2015-09-11 11:31 GMT+02:00 Yaragalla Muralidhar :

> Hi ,
>   I know how to upload a file into the action class but my requirement is
> different. I have a list of pojos where each pojo contains a field called
> file.
>
> for example:-
>
> public class Pojo{
>
> private int pk;
> private File file;
>
>//setters and getters
> }
>
> In my action class:-
>
> public class MyAction{
>
>private List pojos;
>//setter getter
> }
>
> from my jsp when i select a file and say upload it has to set to the Pojo
> "file" property. how do i do that? I have complete idea of how to upload
> directly to the action class but now it is different. the file has to go
> and sit in the Pojo class file property. How can i do this? Please help me?
>
>
>
> *Thanks and Regards,*
> Muralidhar Yaragalla.
>
> *http://yaragalla.blogspot.in/ *
>


Re: problem with file upload

2015-09-11 Thread Yaragalla Muralidhar
Hi Johannes,
 it worked. thank u so much.

*Thanks and Regards,*
Muralidhar Yaragalla.

*http://yaragalla.blogspot.in/ *

On Fri, Sep 11, 2015 at 3:12 PM, Johannes Geppert  wrote:

> Does it not work with the point notation? Not sur if this works when you
> are working with list of object.
>
> 
>
> Best Regards
>
> Johannes
>
> #
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
>
>
> 2015-09-11 11:38 GMT+02:00 Yaragalla Muralidhar  >:
>
> > That is what i am saying. The docs shows how to upload files to action
> > class but my requirement is different. Please read the problem carefully.
> > and do help me.
> >
> > *Thanks and Regards,*
> > Muralidhar Yaragalla.
> >
> > *http://yaragalla.blogspot.in/ *
> >
> > On Fri, Sep 11, 2015 at 3:03 PM, Johannes Geppert 
> > wrote:
> >
> > > Have you already checked the docs?
> > > https://struts.apache.org/docs/file-upload.html
> > >
> > >
> > > Best Regards
> > >
> > > Johannes
> > >
> > > #
> > > web: http://www.jgeppert.com
> > > twitter: http://twitter.com/jogep
> > >
> > >
> > > 2015-09-11 11:31 GMT+02:00 Yaragalla Muralidhar <
> > yaragallamur...@gmail.com
> > > >:
> > >
> > > > Hi ,
> > > >   I know how to upload a file into the action class but my
> requirement
> > is
> > > > different. I have a list of pojos where each pojo contains a field
> > called
> > > > file.
> > > >
> > > > for example:-
> > > >
> > > > public class Pojo{
> > > >
> > > > private int pk;
> > > > private File file;
> > > >
> > > >//setters and getters
> > > > }
> > > >
> > > > In my action class:-
> > > >
> > > > public class MyAction{
> > > >
> > > >private List pojos;
> > > >//setter getter
> > > > }
> > > >
> > > > from my jsp when i select a file and say upload it has to set to the
> > Pojo
> > > > "file" property. how do i do that? I have complete idea of how to
> > upload
> > > > directly to the action class but now it is different. the file has to
> > go
> > > > and sit in the Pojo class file property. How can i do this? Please
> help
> > > me?
> > > >
> > > >
> > > >
> > > > *Thanks and Regards,*
> > > > Muralidhar Yaragalla.
> > > >
> > > > *http://yaragalla.blogspot.in/ *
> > > >
> > >
> >
>


problem in file upload

2008-04-09 Thread Rajeev Sharma
Hi All,

I am using file upload interceptor to upload a file. I am returning XML
response (using result type as stream) to the caller in case of
success or failure. Its all fine, if everything works as expected.

When I try to upload a file which is bigger then the max allowed size,
the file upload interceptor returns input and the control does not
come to the execute method of my action class. In this case I can
redirect the result to some JSP, to some other action etc, but how do I
return a xml response with the error description and some error code. 

Please help me out.

Regards,
Rajeev Sharma


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem in file upload

2008-04-09 Thread Jeromy Evans

Rajeev Sharma wrote:


When I try to upload a file which is bigger then the max allowed size,
the file upload interceptor returns input and the control does not
come to the execute method of my action class. In this case I can
redirect the result to some JSP, to some other action etc, but how do I
return a xml response with the error description and some error code. 

  

Hi Rajeev,

It sounds like you just want an action to return an XML result (for an 
input result).

A very simple way to do that is return a JSP with contentType=text/xml.

in struts.xml:
 result name=inputfailed.jsp/result
in the failed.jsp:

%@ page contentType=text/xml;charset=ISO-8859-1 %
?xml version=1.0 encoding=ISO-8859-1?
messageToo big!/message


You can use properties in your XML as you would with a JSP result.  

There's also an XSLT result type available or you could use a Bean-XML 
serializer like XStream.


Hope that helps,
Jeromy Evans


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem in file upload

2008-04-09 Thread Rajeev Sharma
Hi Jeromy,

Thanks for the help. I tried to do the same thing with an xml file.
Instead of using failed.jsp, I returned an xml file failed.xml with some
hard coded error message and error code.

What if the file upload interceptor returned input for some other
reason? I would be returning the error code and message which says the
file is too large. How would I create the error message and code
dynamically depending on the actual error?

Rajeev

On Wed, 2008-04-09 at 22:22 +1000, Jeromy Evans wrote:
 Rajeev Sharma wrote:
 
  When I try to upload a file which is bigger then the max allowed size,
  the file upload interceptor returns input and the control does not
  come to the execute method of my action class. In this case I can
  redirect the result to some JSP, to some other action etc, but how do I
  return a xml response with the error description and some error code. 
 

 Hi Rajeev,
 
 It sounds like you just want an action to return an XML result (for an 
 input result).
 A very simple way to do that is return a JSP with contentType=text/xml.
 
 in struts.xml:
   result name=inputfailed.jsp/result
  in the failed.jsp:
 
 %@ page contentType=text/xml;charset=ISO-8859-1 %
 ?xml version=1.0 encoding=ISO-8859-1?
 messageToo big!/message
 
 
 You can use properties in your XML as you would with a JSP result.  
 
 There's also an XSLT result type available or you could use a Bean-XML 
 serializer like XStream.
 
 Hope that helps,
  Jeromy Evans
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem in file upload

2008-04-09 Thread Martin Gainty
If you dont mind using freemarker you can always use
exception-interceptor.html
http://struts.apache.org/2.x/docs/exception-interceptor.html

M--
- Original Message -
From: Rajeev Sharma [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, April 09, 2008 1:59 PM
Subject: Re: problem in file upload


 Hi Jeromy,

 Thanks for the help. I tried to do the same thing with an xml file.
 Instead of using failed.jsp, I returned an xml file failed.xml with some
 hard coded error message and error code.

 What if the file upload interceptor returned input for some other
 reason? I would be returning the error code and message which says the
 file is too large. How would I create the error message and code
 dynamically depending on the actual error?

 Rajeev

 On Wed, 2008-04-09 at 22:22 +1000, Jeromy Evans wrote:
  Rajeev Sharma wrote:
  
   When I try to upload a file which is bigger then the max allowed size,
   the file upload interceptor returns input and the control does not
   come to the execute method of my action class. In this case I can
   redirect the result to some JSP, to some other action etc, but how do
I
   return a xml response with the error description and some error code.
  
  
  Hi Rajeev,
 
  It sounds like you just want an action to return an XML result (for an
  input result).
  A very simple way to do that is return a JSP with
contentType=text/xml.
 
  in struts.xml:
result name=inputfailed.jsp/result
   in the failed.jsp:
 
  %@ page contentType=text/xml;charset=ISO-8859-1 %
  ?xml version=1.0 encoding=ISO-8859-1?
  messageToo big!/message
 
 
  You can use properties in your XML as you would with a JSP result.
 
  There's also an XSLT result type available or you could use a Bean-XML
  serializer like XStream.
 
  Hope that helps,
   Jeromy Evans
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with file upload in struts2

2007-04-16 Thread Mahdi Milani Fard

Hi,

I'm trying to upload a file with struts2 on tomcat 5.5. I'm using the method
described in the struts2 documentation (using file upload interceptor with
setters for file, filename and contenttype on the action object). After I
deploy the web application, the first time (and only the first time) that I
try to upload a file, the action object is not populated with the uploaded
file data. From the second time on, the action is correctly populated an
everything goes fine untill I redeploy the application. I'm not sure what
I'm missing here. I'm using the latest versions of commons-fileupload and
commons-io libs.

--
Milani Fard
-- 
View this message in context: 
http://www.nabble.com/Problem-with-file-upload-in-struts2-tf3584102.html#a10014952
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with file upload in struts2

2007-04-16 Thread Dave Newton
--- Mahdi Milani Fard [EMAIL PROTECTED] wrote:
 I'm trying to upload a file with struts2 [...]

Try including the action context cleanup filter as the
first filter in your web.xml. If that fixes it for you
as well I'll add something to the upload wiki docs, so
please follow up.

filter
  filter-namestruts-cleanup/filter-name
  filter-class
org.apache.struts2.dispatcher.ActionContextCleanUp
  /filter-class
/filter

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with file upload in struts2

2007-04-16 Thread Mahdi Milani Fard

That solved the problem. I also had some problem with url objects in jsps.
Sometimes they did not include the params I indicated. That was also solved
with the cleanup filter.


Dave Newton-4 wrote:
 
 --- Mahdi Milani Fard [EMAIL PROTECTED] wrote:
 I'm trying to upload a file with struts2 [...]
 
 Try including the action context cleanup filter as the
 first filter in your web.xml. If that fixes it for you
 as well I'll add something to the upload wiki docs, so
 please follow up.
 
 filter
   filter-namestruts-cleanup/filter-name
   filter-class
 org.apache.struts2.dispatcher.ActionContextCleanUp
   /filter-class
 /filter
 
 d.
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-file-upload-in-struts2-tf3584102.html#a10017784
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with file upload in struts2

2007-04-16 Thread Eric Rank

I had the same problem with file uploads using Struts 2.0.6

I tracked down the source of this problem. To summarize, it's a bug  
that's specific to the Struts 2.0.6 tag; it has since been fixed in  
the repository. The class in question is the FilterDispatcher. In  
short when uploading a file, the request object needs to be wrapped  
by the MultiPartRequestWrapper, but it doesn't always happen, because  
of a flaw in the logic.


Experimenting with the context cleanup filter has proven successful,  
although I haven't tested thoroughly with that solution. The solution  
I've chosen to use is fixing the FilterDispatcher bug in my source.


I have more details in a blog post here:  http://blog.lo-fi.net/ 
2007/04/i-know-why-struts-2-file-upload-fails.html


I hope this helps put this issue to rest,

Eric Rank


On Apr 16, 2007, at 6:45 AM, Dave Newton wrote:


--- Mahdi Milani Fard [EMAIL PROTECTED] wrote:

I'm trying to upload a file with struts2 [...]


Try including the action context cleanup filter as the
first filter in your web.xml. If that fixes it for you
as well I'll add something to the upload wiki docs, so
please follow up.

filter
  filter-namestruts-cleanup/filter-name
  filter-class
org.apache.struts2.dispatcher.ActionContextCleanUp
  /filter-class
/filter

d.


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread temp temp





   I am using jakarta commons fileupload to upload a
file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
   I configured my server to use https protocol.  I
tried  to upload a file it worked fine with netscape
but did not work with internet explorer. I am using IE
6.0


   Here is exception I get when I try to upload a file
over https using internet explorer.
   I am using websphere 5.1 common fileupload  1.0 
and Internet Explorer 6.0   

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)

  at
com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
Source)

  at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)

  at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

  at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)

  at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

  at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

  at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)

  at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)

  at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at

Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread Laurie Harper
What does your form/ tag look like? Are you sure you've specified 
method=POST and enctype=multipart/form-data?


L.

temp temp wrote:






   I am using jakarta commons fileupload to upload a
file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
   I configured my server to use https protocol.  I
tried  to upload a file it worked fine with netscape
but did not work with internet explorer. I am using IE
6.0


   Here is exception I get when I try to upload a file
over https using internet explorer.
   I am using websphere 5.1 common fileupload  1.0 
and Internet Explorer 6.0 	


[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)

  at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

  at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)

  at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)

  at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)

  at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)

  at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)

  at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)

  at
com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
Source)

  at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)

  at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)

  at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)

  at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)

  at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)

  at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)

  at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)

  at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)

  at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)

  at
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)

  at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException - the
request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is null

  at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)

  at
com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
Source)

  at
com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
Source)

  at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)

  at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)

  at

Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread temp temp

Yes I have  multipart/form-data in my jsp .

form name=batchUploadForm 
action=batchfileupload.do method=post 
enctype=multipart/form-data





--- Laurie Harper [EMAIL PROTECTED] wrote:

 What does your form/ tag look like? Are you sure
 you've specified 
 method=POST and enctype=multipart/form-data?
 
 L.
 
 temp temp wrote:
 
  
  
  
  
 I am using jakarta commons fileupload to upload
 a
  file . It worked fine with Internet explorer  and
  netscape navigator  with http protocol.
 I configured my server to use https protocol. 
 I
  tried  to upload a file it worked fine with
 netscape
  but did not work with internet explorer. I am
 using IE
  6.0
  
  
 Here is exception I get when I try to upload a
 file
  over https using internet explorer.
 I am using websphere 5.1 common fileupload  1.0
 
  and Internet Explorer 6.0   
  
  [8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
  FATAL 2005-08-12 08:05:47,220
  actions.BatchUploadAction:handleUnknownException -
 the
  request doesn't contain a multipart/form-data or
  multipart/mixed stream, content type header is
 null
  
 

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
  the request doesn't contain a multipart/form-data
 or
  multipart/mixed stream, content type header is
 null
  
at
 

org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)
  
at
 

com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown
  Source)
  
at
 

com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown
  Source)
  
at
 

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
  
at
 

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
  
at
 

org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
  
at
 

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
  
at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
  
at
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  
at
 

com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
  
at
 

com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
  
at
 

com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
  
at
 

com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
  
at
 

com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
  
at
 

com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
  
at
 

com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
  
at
 

com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
  
at
 

com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown
  Source)
  
at
 

com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
  
at
 

com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
  
at
 

com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)
  
at
 

com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)
  
at
 

com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)
  
at
 

com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
  
at
 

com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
  
at
 

com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
  
at
 

com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
  
at
 

com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
  
at
 

com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
  
at
 

com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)
  
at
 

com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
  
at
 

com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
  
  [8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
  FATAL 2005-08-12 08:05:47,220
  actions.BatchUploadAction:handleUnknownException -
 the
  request doesn't contain a multipart/form-data or
  multipart/mixed stream, content type header is
 null
  
 

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
  the request doesn't contain a multipart/form-data
 or
  multipart/mixed stream, content type header 

Re: [Commons-FileUpload]problem with file upload over https using common fileupload

2005-08-12 Thread Laurie Harper
Do you get the same problem submitting over http instead of https? If so, 
you can use a packet sniffer to see what's actually being submitted to 
figure out what IE's doing wrong. Otherwise you could try writing a filter 
to dump the raw request (the filter would need to keep a copy of the 
request to feed to the rest of the filter chain of course). Or use a 
debugger to step through the multipart handling code in Struts to observe 
what it's reading from the request.


Once you know what the request looks like you should be able to figure out 
if IE is sending bad data or if there's a bug in the request handling 
(which is not likely, but possible).


L.

temp temp wrote:


Yes I have  multipart/form-data in my jsp .

form name=batchUploadForm 
action=batchfileupload.do method=post 
enctype=multipart/form-data






--- Laurie Harper [EMAIL PROTECTED] wrote:



What does your form/ tag look like? Are you sure
you've specified 
method=POST and enctype=multipart/form-data?


L.

temp temp wrote:






  I am using jakarta commons fileupload to upload


a


file . It worked fine with Internet explorer  and
netscape navigator  with http protocol.
  I configured my server to use https protocol. 


I


tried  to upload a file it worked fine with


netscape


but did not work with internet explorer. I am


using IE


6.0


  Here is exception I get when I try to upload a


file


over https using internet explorer.
  I am using websphere 5.1 common fileupload  1.0



and Internet Explorer 6.0   

[8/12/05 8:05:47:223 CDT] 2e34f3c0 SystemOut O
FATAL 2005-08-12 08:05:47,220
actions.BatchUploadAction:handleUnknownException -


the


request doesn't contain a multipart/form-data or
multipart/mixed stream, content type header is


null




org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:


the request doesn't contain a multipart/form-data


or


multipart/mixed stream, content type header is


null


 at




org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:299)


 at




com.bankerssystems.pac.batch.actions.BatchUploadAction.performAction(Unknown


Source)

 at




com.bankerssystems.pac.actions.AbstractActionBase.execute(Unknown


Source)

 at




org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)


 at




org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)


 at




org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)


 at




org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)


 at




javax.servlet.http.HttpServlet.service(HttpServlet.java:740)


 at




javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


 at




com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)


 at




com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)


 at




com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)


 at




com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)


 at




com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)


 at




com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)


 at




com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)


 at




com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)


 at




com.bankerssystems.pac.auth.filters.SecurityFilter.doFilter(Unknown


Source)

 at




com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)


 at




com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1040)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:600)


 at




com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:201)


 at




com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)


 at




com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)


 at




com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)


 at




com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)


 at




com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)


 at




com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)


 at




com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:624)


 at





problem with file upload when validator error happens

2004-08-06 Thread Jade Yaqiong Fang
I have the problem with the file upload validation
error. Actually I can upload files correctly within
the file size limit. but the behavior changes weird
when I got the file upload size up limit error.
For example: I set up 4M as the limit size,
With a 3M file it works fine.
With a 5M file I get errors on logs but upload goes on
in the browser, and it just goes forever, I will wait
longlong time and nothing refreshed , long time later,
it might just get a time out error. 

If i set the size-limit to 10M, 5M upload works well
in less than a seconds, but a 
11M upload takes forever again. I get file-size error
logs in the first request seconds,and I get all the
log info for the new jsp page preparation, I just
never saw that new jsp page displayed in my
browser
and I change the size limit to higher, as long as
within the file size limit, it works fine, and if I
upload a file above the size limit, i can get the file
size error log, but never get the next jsp page come
back. Actually, I take back my words, if I config
struts-config.xml to sth simple jsp page without form,
it works and display the error msg, however, if the
forward page contains multipart/form-data enctype, the
browser just hang on forever.
I am using struts 1.1, and tomcat 5.0.27.  I tried the
example, and also has the validator problem. I am so
lost now...Please help! Thanks.



__
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with file upload when validator error happens

2004-08-06 Thread Emmanouil Batsis
Jade Yaqiong Fang wrote:
I have the problem with the file upload validation
Exactly the same situation with v1.2.
Cheers,
Manos
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem with file upload when validator error happens

2004-08-06 Thread Jade Yaqiong Fang

--- Emmanouil Batsis [EMAIL PROTECTED]
wrote:

 Jade Yaqiong Fang wrote:
 
 I have the problem with the file upload validation
error. Actually I can upload files correctly within
the file size limit. but the behavior changes weird
when I got the file upload size up limit error.
For example: I set up 4M as the limit size,
With a 3M file it works fine.
With a 5M file I get errors on logs but upload goes on
in the browser, and it just goes forever, I will wait
longlong time and nothing refreshed , long time later,
it might just get a time out error. 

If i set the size-limit to 10M, 5M upload works well
in less than a seconds, but a 
11M upload takes forever again. I get file-size error
logs in the first request seconds,and I get all the
log info for the new jsp page preparation, I just
never saw that new jsp page displayed in my
browser
and I change the size limit to higher, as long as
within the file size limit, it works fine, and if I
upload a file above the size limit, i can get the file
size error log, but never get the next jsp page come
back. Actually, I take back my words, if I config
struts-config.xml to sth simple jsp page without form,
it works and display the error msg, however, if the
forward page contains multipart/form-data enctype, the
browser just hang on forever.
I am using struts 1.1, and tomcat 5.0.27.  I tried the
example, and also has the validator problem. I am so
lost now...Please help! Thanks.

 
 Exactly the same situation with v1.2.
 
 Cheers,
 
 Manos
 


So How can I avoid it? I definitely will have a lot of
file upload in many jsp pages, and need them to be
validated . Is there any way to turn around? Thanks.





__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]