he he he, funny, little handholding here try some of the other methods in the API
like f.getAbsolutePath() f.getCanonicalPath() Filip -----Original Message----- From: Raja Sekhar [mailto:[EMAIL PROTECTED] Sent: Monday, March 10, 2003 1:28 PM To: Tomcat Users List Subject: RE: How to get catalina_home variable Hi, I tried this code in my JSP <%@ page import="java.io.*"%> <% File f = new File(System.getProperty("catalina.home")); String path = f.getPath(); System.out.println ("Path : "+path); %> The output is Path .. So this also doesnt seem to work. ..Raj -- On Mon, 10 Mar 2003 13:15:34 Filip Hanik wrote: >>CATALINA_HOME gives only ".." when you access it. > >that should still work > >File f = new File(System.getProperty("CATALINA_HOME")); >String path = f.getPath(); > >or something like that, > >Filip > > > >-----Original Message----- >From: Raja Sekhar [mailto:[EMAIL PROTECTED] >Sent: Monday, March 10, 2003 1:13 PM >To: Tomcat Users List >Subject: Re: How to get catalina_home variable > > >CATALINA_HOME gives only ".." when you access it. It doesnt give anything extra. Its >different from the java.home. So we still have a problem. Try out this >-- > >On Mon, 10 Mar 2003 10:38:15 > Steve Guo wrote: >> >>Tim is right - I am learning something new too. >>Interestingly, System.getProperty('java.home') gives 'c:\j2sdk1.4.1_01\jre' on my >>PC. >> >> Tim Funk <[EMAIL PROTECTED]> wrote:System.getProperty("catalina.home") should give >> you the CATALINA_HOME >>environment variable without doing anything extra special to any startup >>script. >> >>System.getProperty("catalina.base") will give you ... CATALINA_BASE >> >>-Tim >> >> >>Shapira, Yoav wrote: >>> Howdy, >>> In your startup script, add a -D argument to java with the value of >>> Catalina home and whatever name you desire. Let's say you want >>> "myCatalinaHome" is the property name. Then do: >>> java -DmyCatalinaHome=%CATALINA_HOME% >>> And it will be available to your programs as >>> System.getProperty("myCatalinaHome"); >>> >>> That said, I don't like your design at all. The functioning of your >>> JSPs (or any other parts of your webapp) should have nothing to do with >>> where your server is installed. >>> >>> Yoav Shapira >>> Millennium ChemInformatics >>> >>> >>> >>>>-----Original Message----- >>>>From: Raja Sekhar [mailto:[EMAIL PROTECTED] >>>>Sent: Monday, March 10, 2003 9:59 AM >>>>To: [EMAIL PROTECTED] >>>>Subject: How to get catalina_home variable >>>> >>>>Hi, >>>> >>>>I am using Tomcat 4.0.6. I am writing a JSP in which I want to get the >>>>catalina_home path. I am giving the code as >>>>System.getProperty("CATALINA_HOME"). This is retreving me null. >>>> >>>>I am running tomcat using startup.bat. Please help me asap if you have >>> >>> any >>> >>>>suggestions. >>>> >>>>Thanks & Regards, >>>> >>>>..Raj >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >>--------------------------------- >>Do you Yahoo!? >>Yahoo! Tax Center - forms, calculators, tips, and more > > >Need a new email address that people can remember >Check out the new EudoraMail at >http://www.eudoramail.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > Need a new email address that people can remember Check out the new EudoraMail at http://www.eudoramail.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
