Showing posts with label context path. Show all posts
Showing posts with label context path. Show all posts

Wednesday, March 2, 2011

Getting context path in serlvets

if (servletContext.getMajorVersion() == 2
&& servletContext.getMinorVersion() <= 4) {
return servletContext.getServletContextName();
} else {
return servletContext.getContextPath();
}

Monday, February 14, 2011

Changing Context Root of application during deployment in Weblogic

Configuring Applications for Production Deployment: "You cannot use a deployment plan to change the context-root in an application.xml file. However, if an application is deployed as a library, you can either change the context-root through an weblogic-application.xml file or use the deployment plan to change the context-root in an weblogic-application.xml file."

Wednesday, August 18, 2010

In order get application's context path in JSF, do the following:
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();