tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubbard, Charles (ISSAtlanta)" <>
Subject RE: Writing exception trace to a file
Date Tue, 02 May 2000 14:02:58 GMT

You can use the getPathTranslated() method or the getRealPath(string) method
in the request object to get the path where the servlet/jsp exists on the
local file system.  Then you can open up a file in that directory and write
it out.  The only problem with this approach is that someone could request
the exception trace file through the webserver which could give an attacker
very particular information about how your app works.


-----Original Message-----
From: Chris Howard []
Sent: Tuesday, May 02, 2000 6:43 AM
Subject: Writing exception trace to a file

I'm trying to write the exception trace to a file.  I want the file to be
appended to the same debug file that is located in the same directory as the
jsp file is located.  Tomcat defaults the path for printwriter to the
tomcat/bin directory.  How can I write the file to the directory where the
jsp file is located?


To unsubscribe, email:
For additional commmands, email:

View raw message