In some of my early testing (as much as 3 - 4 years back) I found that
servlet containers, at the time, might ignore query parameters in the
URL on a form submission or multipart form submission (I can't
remember which now).  I changed Tapestry to force everything into the
form submission then.  We can look into changing this now.

On 6/9/05, Tomas Jucius <[EMAIL PROTECTED]> wrote:
> Problematic methods:
> 
> ---------------------------AbstractEngine class------------------------:
> 
>  protected String extractServiceName(RequestContext context)
>     {
>         if 
> (context.getRequest().getAttribute(Tapestry.TAG_SUPPORT_SERVICE_ATTRIBUTE)
> != null)
>             return Tapestry.TAGSUPPORT_SERVICE;
> 
>         String serviceData =
> context.getParameter(Tapestry.SERVICE_QUERY_PARAMETER_NAME);
> 
>         if (serviceData == null)
>             return Tapestry.HOME_SERVICE;
> 
>         // The service name is anything before the first slash,
>         // if there is one.
> 
>         int slashx = serviceData.indexOf('/');
> 
>         if (slashx < 0)
>             return serviceData;
> 
>         return serviceData.substring(0, slashx);
>     }
> 
> ----------------------------------------RequestContext
> class----------------------:
> 
>     public String getParameter(String name)
>     {
>         IMultipartDecoder decoder = getDecoder();
>         if (decoder != null)
>             return decoder.getString(_request, name);
> 
>         return _request.getParameter(name);
>     }
> 
> On 6/9/05, Schulte Marcus <[EMAIL PROTECTED]> wrote:
> > The problem is the following:
> >
> > If the request ist multipart/mime-encoded, Tapestry expects ALL
> > parameters to be parts of the multipart request. This works well if
> > all the parameters come from a form-submit which is the case with
> > tapestry-generated pages.
> > Now, FCKeditor, when uploading a file, puts the parameters in the URL  - the
> > only part of
> > the multipart-request is the file itself. In that case these parameters are
> > not returned
> > by IRequestCycle.getParameter(), but they are returned by
> > HttpServletRequest.getParameter().
> >
> > It would be quite easy to patch this (I'd be happy to provide the 2 or 3
> > lines). It certainly wouldn't break anything, would it?
> >
> > > -----Original Message-----
> > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, June 08, 2005 9:52 PM
> > > To: Tapestry users; Tomas Jucius
> > > Subject: Re: Bug in RequestContext ???? Tapestry 3.0.3
> > >
> > >
> > > That should be working; that is, be sure to use
> > > IRequestCycle.getParameter(), not HttpServletRequest.getParameter().
> > >
> > > On 6/8/05, Tomas Jucius <[EMAIL PROTECTED]> wrote:
> > > > I'd like to ask again.. It's important for my project..
> > > >
> > > >
> > > > Then the request is form/multipart-data, why I can't still
> > > access service name?
> > > >
> > > > Shouldn't this method return service name in both situations?
> > > >
> > > >
> > > >
> > > >   public String getParameter(String name)
> > > >     {
> > > >         IMultipartDecoder decoder = getDecoder();
> > > >         if (decoder != null)
> > > >             return decoder.getString(_request, name);
> > > >
> > > >         return _request.getParameter(name);
> > > >     }
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Howard M. Lewis Ship
> > > Independent J2EE / Open-Source Java Consultant
> > > Creator, Jakarta Tapestry
> > > Creator, Jakarta HiveMind
> > >
> > > Professional Tapestry training, mentoring, support
> > > and project work.  http://howardlewisship.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]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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

Reply via email to