On Tue, Sep 8, 2009 at 12:33 PM, FaRHaN <farhan.ba...@ymail.com> wrote:
> I want to make it a separate API for file uploading. So that i can embed it > in any of the application regardless of the framework (wicket, JSF, struts > etc.). The only reason is that, we can use Apache Commons FileUpload API in > any of the framework. > Is there any workaround to do this ? > > > This is very interesting. When you say "embed it in any of the application regardless of the framework" what do you mean ? A tag library ? Suppose you have a multipart form, that contains input fields PLUS a type="file" field, to what URL will you POST it and have the input data also bound / handled ? Note that Wicket already has FileUpload built in, that too as a pure Java API so I'm trying to understand your end-goal better. > > ________________________________ > From: Jeremy Thomerson <jer...@wickettraining.com> > To: users@wicket.apache.org > Sent: Tuesday, September 8, 2009 12:44:08 PM > Subject: Re: Usage of Servlets in Wicket, How ? > > Maybe if you mention the specific reason(s) that you want to use Apache > Commons FileUpload API rather than Wicket's built-in forms and file upload > mechanisms, someone on the list will be able to provide you with more help. > It seems that the FileUpload API is intended to help you if you have to > write servlets to handle forms. But with Wicket, you don't have to do > this. And if you use ACFU API, then you lose the rest of Wicket's stateful > form handling. > > -- > Jeremy Thomerson > http://www.wickettraining.com > > > > On Tue, Sep 8, 2009 at 1:04 AM, FaRHaN <farhan.ba...@ymail.com> wrote: > > > > > > > I want to upload files through Commons FIleUpload API. As Commons > > FileUpload API requires HttpServletRequest for uploading files (e.g. > > fileItemsList = servletFileUpload.parseRequest(httpServletRequest)). > > Parsing HttpServletRequest is the necessary step while uploading in > Commons > > FileUpload. > > > > I have got httpServletRequest from RequestCycle. e.g. > ((ServletWebRequest) > > getRequest()).getHttpServletRequest() or > > ((WebRequest)requestCycle.getRequest()).getHttpServletRequest() but this > > request already being parsed automatically in RequestCycle, before > reaching > > servletFileUpload.parseRequest(httpServletRequest). So, "Request is > already > > been parsed..." exception occur. > > > > That's why i want to use Servlet's doGet(request, response) method for > > getting HttpServletRequest(without parsing). > > > > If not servlets, Is there any other way to handle FileUploading (through > > Apache Commons API) in wicket ? > > > > Thanks... > > > > > > ________________________________ > > From: Peter Thomas <ptrtho...@gmail.com> > > To: users@wicket.apache.org > > Sent: Tuesday, September 8, 2009 11:39:58 AM > > Subject: Re: Usage of Servlets in Wicket, How ? > > > > Refer this: > > > > > > > http://cwiki.apache.org/WICKET/how-to-redirect-to-an-external-non-wicket-page.html > > > > If that doesn't help you should briefly explain what your requirement is. > > There may be a better way to achieve it within Wicket instead of hacking > > around with servlets. > > > > On Tue, Sep 8, 2009 at 10:57 AM, FaRHaN <farhan.ba...@ymail.com> wrote: > > > > > but how can we call it from our wicket web page ? > > > > > > > > > > > > > > > ________________________________ > > > From: Jeremy Thomerson <jer...@wickettraining.com> > > > To: users@wicket.apache.org > > > Sent: Tuesday, September 8, 2009 11:10:49 AM > > > Subject: Re: Usage of Servlets in Wicket, How ? > > > > > > servlets are totally separate from Wicket - write a servlet and add it > to > > > your web.xml. See any servlet example on the web (non-Wicket related) > > for > > > assistance. > > > > > > -- > > > Jeremy Thomerson > > > http://www.wickettraining.com > > > > > > > > > > > > On Mon, Sep 7, 2009 at 11:54 PM, FaRHaN <farhan.ba...@ymail.com> > wrote: > > > > > > > Hi, > > > > > > > > Is there any example in Wicket that uses Servlets (doGet() & > doPost()). > > I > > > > mean how can we configure Servlets in our wicket application and use > > > > doGet(request, response) & doPost(request, response) methods. I know > > > web.xml > > > > configuration for Servlets but how can we use doGet() & doPost() > > methods. > > > Do > > > > we need wicket:ids in Servlets ? > > > > Is there any reference for such type of example ? > > > > > > > > Thanks... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >