You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Michael Katz <ec...@yahoo.com> on 2004/04/06 15:33:59 UTC

file upload with javax.portlet.PortletRequest?

Hi,
Is there an easy way to use the FileUpload component with a 
javax.portlet.PortletRequest instead of a 
javax.servlet.http.HttpServletRequest?

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: file upload with javax.portlet.PortletRequest?

Posted by Martin Cooper <ma...@apache.org>.

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Michael Katz
> Sent: Thursday, April 08, 2004 10:42 AM
> To: commons-user@jakarta.apache.org
> Subject: Re: file upload with javax.portlet.PortletRequest?
>
>
> Silly me, there is a bug at
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23620
> which someone has already produced a
> PortletFileUploadBase.java and PortletDiskFileUpload.java
> Seems like a lot of copying of code, but I guess its a quick fix.
>
> Seems like just changes to the methods that took a httprequest, to be an
> actionrequest, and only a few calls to the actionrequest are different
> than the http ones.
>
>
> But more important I see there is a bug with the DefaultFileItem leaking
> memory, which a Forrest Girouard posted a patch to.  So when you do get
> time to devote to the FileUpload component, I would hope that bug would
> be higher on your list than the above which is really a simple fix to
> get at least working code.

Yes, indeed. Thanks to Noel Bergman, I added a class to Commons IO recently
that will help resolve the leak. The plan is to add a dependency of
FileUpload on IO as soon as the latter component is released. All
indications are that that release will happen pretty soon.

--
Martin Cooper


> Thanks.
>
>
> Martin Cooper wrote:
> >
> >>-----Original Message-----
> >>From: news [mailto:news@sea.gmane.org]On Behalf Of Michael Katz
> >>Sent: Tuesday, April 06, 2004 10:08 AM
> >>To: commons-user@jakarta.apache.org
> >>Subject: Re: file upload with javax.portlet.PortletRequest?
> >>
> >>
> >>Thanks for the reply.
> >>Do you know the general timeline for that refactoring?
> >
> >
> > Other than "when I get to it", no, I don't. In the very near
> term, most of
> > my time is going into finishing the migration of Struts over to
> an Apache
> > top level project, and into getting the Struts 1.2.1 release
> out the door.
> > FileUpload will be next in line once those are out of the way.
> >
> >
> >>If it's going to be a while, I guess i'll temporarily create a new
> >>FileUploadBase.java and DiskFileUpload.java using my portletrequest,
> >>looks like i'd actually have to use the actionrequest so that i can get
> >>the input stream.
> >
> >
> > If you do decide to do that, I'd be interested in hearing about what you
> > needed to do. Knowing more about where I'm going will most
> likely help me
> > get there faster. ;-)
> >
> > --
> > Martin Cooper
> >
> >
> >
> >>Thanks.
> >>
> >>
> >>Martin Cooper wrote:
> >>
> >>
> >>>"Michael Katz" <ec...@yahoo.com> wrote in message
> >>>news:c4ubk7$9mh$1@sea.gmane.org...
> >>>
> >>>
> >>>>Hi,
> >>>>Is there an easy way to use the FileUpload component with a
> >>>>javax.portlet.PortletRequest instead of a
> >>>>javax.servlet.http.HttpServletRequest?
> >>>
> >>>
> >>>Not yet, but I'm working on a refactoring of FileUpload that
> >>
> >>would help with
> >>
> >>>that.
> >>>
> >>>--
> >>>Martin Cooper
> >>>
> >>>
> >>>
> >>>
> >>>>Thanks
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: file upload with javax.portlet.PortletRequest?

Posted by Michael Katz <ec...@yahoo.com>.
Silly me, there is a bug at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23620
which someone has already produced a
PortletFileUploadBase.java and PortletDiskFileUpload.java
Seems like a lot of copying of code, but I guess its a quick fix.

Seems like just changes to the methods that took a httprequest, to be an 
actionrequest, and only a few calls to the actionrequest are different 
than the http ones.


But more important I see there is a bug with the DefaultFileItem leaking 
memory, which a Forrest Girouard posted a patch to.  So when you do get 
time to devote to the FileUpload component, I would hope that bug would 
be higher on your list than the above which is really a simple fix to 
get at least working code.

Thanks.


Martin Cooper wrote:
> 
>>-----Original Message-----
>>From: news [mailto:news@sea.gmane.org]On Behalf Of Michael Katz
>>Sent: Tuesday, April 06, 2004 10:08 AM
>>To: commons-user@jakarta.apache.org
>>Subject: Re: file upload with javax.portlet.PortletRequest?
>>
>>
>>Thanks for the reply.
>>Do you know the general timeline for that refactoring?
> 
> 
> Other than "when I get to it", no, I don't. In the very near term, most of
> my time is going into finishing the migration of Struts over to an Apache
> top level project, and into getting the Struts 1.2.1 release out the door.
> FileUpload will be next in line once those are out of the way.
> 
> 
>>If it's going to be a while, I guess i'll temporarily create a new
>>FileUploadBase.java and DiskFileUpload.java using my portletrequest,
>>looks like i'd actually have to use the actionrequest so that i can get
>>the input stream.
> 
> 
> If you do decide to do that, I'd be interested in hearing about what you
> needed to do. Knowing more about where I'm going will most likely help me
> get there faster. ;-)
> 
> --
> Martin Cooper
> 
> 
> 
>>Thanks.
>>
>>
>>Martin Cooper wrote:
>>
>>
>>>"Michael Katz" <ec...@yahoo.com> wrote in message
>>>news:c4ubk7$9mh$1@sea.gmane.org...
>>>
>>>
>>>>Hi,
>>>>Is there an easy way to use the FileUpload component with a
>>>>javax.portlet.PortletRequest instead of a
>>>>javax.servlet.http.HttpServletRequest?
>>>
>>>
>>>Not yet, but I'm working on a refactoring of FileUpload that
>>
>>would help with
>>
>>>that.
>>>
>>>--
>>>Martin Cooper
>>>
>>>
>>>
>>>
>>>>Thanks
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: file upload with javax.portlet.PortletRequest?

Posted by Martin Cooper <ma...@apache.org>.

> -----Original Message-----
> From: news [mailto:news@sea.gmane.org]On Behalf Of Michael Katz
> Sent: Tuesday, April 06, 2004 10:08 AM
> To: commons-user@jakarta.apache.org
> Subject: Re: file upload with javax.portlet.PortletRequest?
>
>
> Thanks for the reply.
> Do you know the general timeline for that refactoring?

Other than "when I get to it", no, I don't. In the very near term, most of
my time is going into finishing the migration of Struts over to an Apache
top level project, and into getting the Struts 1.2.1 release out the door.
FileUpload will be next in line once those are out of the way.

> If it's going to be a while, I guess i'll temporarily create a new
> FileUploadBase.java and DiskFileUpload.java using my portletrequest,
> looks like i'd actually have to use the actionrequest so that i can get
> the input stream.

If you do decide to do that, I'd be interested in hearing about what you
needed to do. Knowing more about where I'm going will most likely help me
get there faster. ;-)

--
Martin Cooper


> Thanks.
>
>
> Martin Cooper wrote:
>
> > "Michael Katz" <ec...@yahoo.com> wrote in message
> > news:c4ubk7$9mh$1@sea.gmane.org...
> >
> >>Hi,
> >>Is there an easy way to use the FileUpload component with a
> >>javax.portlet.PortletRequest instead of a
> >>javax.servlet.http.HttpServletRequest?
> >
> >
> > Not yet, but I'm working on a refactoring of FileUpload that
> would help with
> > that.
> >
> > --
> > Martin Cooper
> >
> >
> >
> >>Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: file upload with javax.portlet.PortletRequest?

Posted by Michael Katz <ec...@yahoo.com>.
Thanks for the reply.
Do you know the general timeline for that refactoring?

If it's going to be a while, I guess i'll temporarily create a new 
FileUploadBase.java and DiskFileUpload.java using my portletrequest, 
looks like i'd actually have to use the actionrequest so that i can get 
the input stream.

Thanks.


Martin Cooper wrote:

> "Michael Katz" <ec...@yahoo.com> wrote in message
> news:c4ubk7$9mh$1@sea.gmane.org...
> 
>>Hi,
>>Is there an easy way to use the FileUpload component with a
>>javax.portlet.PortletRequest instead of a
>>javax.servlet.http.HttpServletRequest?
> 
> 
> Not yet, but I'm working on a refactoring of FileUpload that would help with
> that.
> 
> --
> Martin Cooper
> 
> 
> 
>>Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: file upload with javax.portlet.PortletRequest?

Posted by Martin Cooper <ma...@apache.org>.
"Michael Katz" <ec...@yahoo.com> wrote in message
news:c4ubk7$9mh$1@sea.gmane.org...
> Hi,
> Is there an easy way to use the FileUpload component with a
> javax.portlet.PortletRequest instead of a
> javax.servlet.http.HttpServletRequest?

Not yet, but I'm working on a refactoring of FileUpload that would help with
that.

--
Martin Cooper


>
> Thanks




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org