Howdy,

>The directory it returns is C:\tomcat\work\Standalone\localhost\gss and
>I can write test.txt there fine.  If I try to make a hyper link to
>http://localhost:8080/gss/test.txt, though, Tomcat returns 404.  Do I
>have to do something special to tell Tomcat to serve the file?

You can only http hyperlink to resources under your webapp root.  Your
temp file is not under your webapp root.  So you need a servlet that
will read your temp file, and write it out to the response.  Something
like:
BufferedReader bin = new BufferedReader(new FileReader(myFile));
PrintWriter out = response.getWriter();
String line = null;

while((line = bin.readLine()) != null) {
  out.println(line);
  out.flush();
}

Alternative approaches exist.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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

Reply via email to