If you don't want to loose the session if the client disabled
cookies you have to encode the url, otherwise the servlet
that receives the post will see a new session.

> -----Urspr�ngliche Nachricht-----
> Von: Rhett Savage [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 22. April 2001 21:26
> An: [EMAIL PROTECTED]
> Betreff: Re: file upload servlet
> 
> 
> i'm a little surprised to see the action of this form wrapped by
> response.encodeUrl() - is that in fact the ordinary way to do
> business? i'm aware of the reasons for doing this in ordinary hrefs,
> but i'd wondered if it would be necessary in a <form> action...?
> 
> rhett
> 
> On Sun, 22 Apr 2001, Christoph Kukulies wrote:
> 
> > On Sun, Apr 22, 2001 at 11:05:44AM -0700, Anne Dirkse wrote:
> > > My guess is that you have an extra > somewhere (or that 
> you missed the <
> > > at action=<%=)
> >
> > The trailing = looks like being added by the mailer.
> >
> > It seems to me that I'm missing something more essential. 
> I'm running
> > tomcat 3.2 beta. The (jsp) examples all seem to work.
> >
> > Even written like this:
> > <html>
> > <form enctype="multipart/form-data" action=<%
> >  response.encodeUrl("/servlets/servlet/Upload")
> > %>
> > method="post">
> > <input type="file" name="FileData" value="" size="52" 
> maxlength="255">
> > <input type="submit" value="Abschicken">
> > </form>
> > </html>
> >
> > doesn't change the picture.
> >
> > >
> > > Anne
> > >
> > > Christoph Kukulies wrote:
> > > >
> > > > On Fri, Apr 20, 2001 at 06:58:26PM +0200, Ralph Einfeldt wrote:
> > > > > For a pure HTML solution you need two things:
> > > > >
> > > > > a form with at least one file input tag:
> > > > >
> > > > > <form enctype="multipart/form-data" action=<%=
> > > > > response.encodeUrl("'path-to-your-servlet'") %> method="post">
> > > > > <input type="file" name="FileData" value="" size="52" 
> maxlength="255">
> > > > > </form>
> > > >
> > > > This is looking very elegant to me. I tried it but I'm getting
> > > >
> > > > method="post">
> > > >
> > > > at the beginning of the page when it appears in the browser.
> > > >
> > > > Is there a typo (or some mail agent added something, 
> like a '=' sign?)
> > > > or am I missing something more severe?
> > > >
> > > > --
> > > > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> >
> > --
> > Chris Christoph P. U. Kukulies [EMAIL PROTECTED]
> >
> 
> 

Reply via email to