Whta is the FileObject ?
You can use the ServletContext().getRealPath( url ) to avoid specifying the
full path in your servlet.
Jack
> -----Original Message-----
> From: Hartono (Telebot) [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, October 11, 1999 06:30
> To: [EMAIL PROTECTED]
> Subject: How to open a file using Web Address ?
>
> Hi ...
>
> I want to open an HTML file using a servlet, so I didn't have to code the
> HTML in my servlet !
> Currently I'm using the path to my C: drive like the following lines !!
>
> FileObject endObj = new
> FileObject("C:\\servlet\\PostingJob\\end.html");
>
>
> But when I changed the referenced like :
>
> FileObject endObj = new FileObject("
> <http://localhost:8000/servlet/PostingJob/main.html>);
>
> The servlet cannot open the file and give me an exception ???
>
> any body know how to do this ??
>
> any help would very appreciated !!
>
> regards,
> Hartono sutirman
>
___________________________________________________________________________
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