I was using the path in a similar way but passing the whole URL:
e.g.
http://192.168.1.105/test1/servlet/test1/http://www.example.com/main/page1.html
This worked fine for tomcat v3.2.1 but when I upgraded to v3.2.3 the '//' got
converted to '/'. I realise this was for security
reasons but, out of interest, is the above URL really considered illegal or a security
threat?
----- Original Message -----
From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 13, 2001 1:48 PM
Subject: Re: file download servlet
> you could go a step further than that, and remove the query string
> altogether, extracting it from the request url. That way the end user
> wouldn't even know it was being served by a servlet (well, the /servlet
> might give it away, but you could change that if it mattered)...
>
> cheers
> dim
>
> On Thu, 13 Sep 2001, Ketan Patel wrote:
>
> > Hi,
> > To download file with the specific file name like song.mp3 as your
> > following url
> > http://192.168.1.105/download/servlet/download?filename=song.mp3
> > changed it with following url-
> > http://192.168.1.105/download/servlet/download/song.mp3?filename=song.mp3
> > .
> > So while downloading the extrapath song.mp3 will be the filename.
> >
> > -Ketan
> >
> > chiuming wrote:
> > >
> > > I asked this question before, but I didn't get any
> > > reply. I post it again in hope someone could give me
> > > some hint.
> > >
> > > I have a file download servlet serves web browsers.
> > >
> > > request to file is like this
> > > http://192.168.1.105/download/servlet/download?filename=song.mp3
> > >
> > > The file on the server side is song.mp3. But the file
> > > got download to
> > > browser is the servlet name instead. :(
> > >
> > > I heard i need to use the HTTP header
> > > res.setHeader("Content-Disposition","attachment;
> > > filename=\"" +
> > > downloadFile + "\";");
> > >
> > > Is Content-Disposition a standard header in HTTP spec?
> > > I heard i should use this whenever I don't want the
> > > content display on browser (force Save as Dialog box)
> > >
> > > Why everytime I download a file from the web server
> > > like song.mp3.
> > > there is no such HTTP header from web server? -->
> > > Content-Disposition
> > >
> > > I think web server is just like a download servlet. It
> > > sends raw bytes to web browser. After browser get the
> > > bytes, It will not konw what name the file should save
> > > as. Web server must send some kind of HTTP header to
> > > tell web browser what file name the file is saved as.
> > > right?
> > >
> > > How exactly is web server instruct web browser to pop
> > > up Save as Dialog box (on unknown mime type) and save
> > > the file with name = filename on server? Does web
> > > server use any special HTTP Header (like
> > > Content-Disposition)
> > >
> > > thanks.
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
> > > http://im.yahoo.com
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
>
>
>