Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
View Interest List Message Details
<< Back to Search Results

Date: 03/18/2005
From: matt@newatlanta.com
Subject: RE: [ServletExec] Deployed directory
Here's 2 ways:

1. 
String appRootPath =
getServletConfig().getServletContext().getRealPath("/");

2.  
String contextPath = request.getContextPath();
if(contextPath.equals(""))
 contextPath = "/";

String appRootPath = request.getRealPath(contextPath);




Note that #2 is only useful at request-time.

Matt

-----Original Message-----
From: servletexec-interest-owner@mail.newatlanta.com
[mailto:servletexec-interest-owner@mail.newatlanta.com] On Behalf Of Mark G.
Woodruff
Sent: Friday, March 18, 2005 3:07 PM
To: servletexec-interest@mail.newatlanta.com
Subject: [ServletExec] Deployed directory


How does an application determine at run time the
directory to which it has been deployed? SE5 doesn't
set the current directory to the deployed directory.

Mark


	
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

   http://www.newatlanta.com/servletexec-interest.jsp


-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

    http://www.newatlanta.com/servletexec-interest.jsp

Message Thread
Date Subject Author
03/18/2005 RE: [ServletExec] Deployed directory matt@newatlanta.com
03/18/2005 [ServletExec] Deployed directory markgwoodruff@yahoo.com
<< Back to Search Results


   
company media information terms of use privacy policy contact us