you can use context.getRealPath("/") to get the root folder of your web app, then use relative path to get to other folder. Raja Sekhar <[EMAIL PROTECTED]> wrote:Hi Shaipra,
I have done the way you said. I get the output as .. I think the reason is in catalina.bat its set that way. But some how I want to get the location of the folder installed. Regarding usage of this property actually i am trying to use it in my servlet at the backend to initiate some logs and stuff like that. I will definitely consider your suggestion and presently I am not doing any kind of that. Please let me know how to do this.. Thanks & Regards, ..Raj -- On Mon, 10 Mar 2003 10:16:25 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 >> >> >>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] > > > > >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] > > 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] --------------------------------- Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, and more