Thanks. I'll move over to that list, but I'm looking for the
application path. Not the context path.
Craig McClanahan wrote:
On 7/28/06, Marty Phee <[EMAIL PROTECTED]> wrote:
How do I get the application path.
I can see it in the debugger through the ApplicationContextFacade, but
not sure how to access it.
I need the path of the application to pass on to a report generator.
Shale has migrated to its own top level project with it's own mailing
lists
... you'll want to refer to <http://shale.apache.org/mail-lists.html> for
subscription information.
But, to answer this particular question, the context path of an
application
is available from the ExternalContext associated with the current
request.
In a view controller (or other class that extends AbstractFacesBean), you
can call:
String contextPath = getExternalContext().getContextPath();
or, in any sort of backing bean, you can use the more verbose approach:
FacesContext context = FacesContext.getCurrentInstance();
String contextPath = context.getExternalContext().getContextPath();
Thanks,
Marty
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]