Top "Contextpath" questions

Context path refers to the portion of the web request URI that indicates the context of the request.

How to use relative paths without including the context root name?

To working my static file (CSS, JS) I have to write absolute path like /AppName/templates/style/main.css. Is …

jsp servlets resources relative-path contextpath
What are the recommendations for html <base> tag?

I've never seen <base> HTML tag actually used anywhere before. Are there pitfalls to its use that means …

html contextpath base-tag
How is using "<%=request.getContextPath()%>" better than "../"

I have worked on number of J2EE projects where the view layer is JSP. In most projects, I have …

jsp contextpath
How get the base URL via context path in JSF?

I have this structure: WebContent resources components top.xhtml company about_us.xhtml index.xhtml top.xhtml is a component, …

jsf base-url contextpath
Retrieving the servlet context path from a Spring web application

I would like to be able to dynamically retrieve the "servlet context path" (e.g. http://localhost/myapp or http://…

spring servlets contextpath
Spring MVC Request URLs in JSP

I am writing a web application using Spring MVC. I am using annotations for the controllers, etc. Everything is working …

html spring spring-mvc contextpath
How to auto direct to "my web application" from "root (/)" context in JBoss?

I am using JBoss 6.0 . I have deployed my web application: myApp.ear under the web-context: "/test". So in browser-url if …

redirect jboss contextpath
Any clever ways of handling the context in a web app?

In Java, web apps are bundled in to WARs. By default, many servlet containers will use the WAR name as …

java jsp servlets contextpath
Whats the better way to identify the context path in Angular JS

I have my web application deployed to tomcat with an applicatio context. For example my URL looks something like this. …

angularjs spring-mvc contextpath
How can I map multiple contexts to the same war file in Tomcat?

I'm using tomcat to deploy my applications, I would like to deploy as one single war to should server multiple …

tomcat mapping contextpath