tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubbard, Charles (ISSAtlanta)" <CHubb...@iss.net>
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.

charlie

-----Original Message-----
From: Chris Howard [mailto:choward@asgna.com]
Sent: Tuesday, May 02, 2000 6:43 AM
To: tomcat-user@jakarta.apache.org
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?

Cheers,
Chris


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message