Hi, This is practically a FAQ, and it's been discussed on this list numerous times, so an archive search might prove helpful.
You can try to use ServletContext#getRealPath("/"), but if running from a packed WAR that will fail. Then again, what you're trying to do is against the spirit of the Servlet Spec anyways, so you might not care for the packed WAR use-case. Yoav Shapira http://www.yoavshapira.com >-----Original Message----- >From: Duncan Krebs [mailto:[EMAIL PROTECTED] >Sent: Tuesday, November 09, 2004 5:21 PM >To: [EMAIL PROTECTED] >Subject: Getting filepath of webapp without using Reqeust or Response > >Hi, >I'm trying to figure out how I can lookup the real file path of my webapp >in code without using the HttpServletResponse or HttpServletRequest. I have >a lot of classes calling other classes and its annoying to always have to >pass the request objects as parameters. Does anyone know if this is >possible? Thanks - Duncan 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]