Thanks
Show the conclusion:
httpservletresponse.setContentType("application/octet-stream; name=" + s);
javax.servlet.ServletOutputStream myservletoutputstream=
httpservletresponse.getOutputStream();
then
byte abyte0[] = new byte[4096];
boolean flag = true;
try
{
FileInputStream fileinputstream = new FileInputStream(s);
int i;
while((i = fileinputstream.read(abyte0)) != -1)
outputstream.write(abyte0, 0, i);
fileinputstream.close();
}
catch(Exception _ex)
{
flag = false;
}
return flag;
bye Paolo
----- Original Message -----
From: Fedor Karpelevitch <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2000 10:12 AM
Subject: Re: Cover url in response.sendRedirect()
> If you are passing the file through a servlet you can perform any
> authentication in the servlet with no problem just before serving the file.
>
> WBR, Fedor.
>
> Today: Arguing with an Engineer is a lot like wrestling in the mud with a
> pig - After a few hours, you realize the pig likes it.
>
>
> > -----Original Message-----
> > From: Paolo Gallo [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 20, 2000 8:31 AM
> > To: [EMAIL PROTECTED]
> > Subject: R:Re: Cover url in response.sendRedirect()
> >
> >
> > >
> > > This solution seems OK to me. Make sure not to forget to
> > set content-type
> > > properly for each file type. Is there anything about this
> > solution you do
> > > not like?
> >
> > Why do you need to hide the URL?
> > >
> > My application provide "check in" and "check out" function
> > for document version's.
> > Allow functions only to authorized user
> > Paolo
> >
> > ______________________________________________________________
> > _____________
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> > http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html