----- Original Message -----
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, June 05, 2008 1:26 AM
Subject: RE: Relative internal links
From: Johnny Kewl [mailto:[EMAIL PROTECTED]
Subject: Re: Relative internal links
Have a look at this function...
getServletContext().getRealPath("/");
Thats a nice way to find out where you are....
Only if you're running in an environment that supports the call. If you're
on a device without an accessible file system, or if the webapp is coming
out of an unexpanded .war file, you're out of luck. Depending on
getRealPath() indicates you've made a serious design error somewhere back up
the road.
- Chuck
====================
OK interesting... got me as curious as anything ;)
What devices does tomcat run on that doesnt have a file system? Are you
thinking cell?
like "../webapps/MCRCServlets/logs/MCRCServlet.log" in the Java Code.
He's clearly trying to make a private log file folder..
If you dont use getServletContext().getRealPath("/")... what do you suggest
he does?
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]