Questions tagged [contextpath]

Context path refers to the portion of the web request URI that indicates the context of the request. The context path always comes first in a request URI.

Context path refers to the portion of the web request URI that indicates the context of the request. The context path always comes first in a request URI.

For example - in the http://www.example.com/myContextPath/hello.jsp, the context path is myContextPath.

216 questions
4
votes
2 answers

Redirect to URL with trailing slash doesn't occur in Websphere 8.5.5

There is an application that works on WAS7. It has war module deployed on context path "Foo/Bar" (compound one). That is the war module is accessible via the URL like this: localhost:9080/Foo/Bar. Then I deployed the same application on WAS 8.5.5.…
Siarhei Vouchak
  • 125
  • 1
  • 10
4
votes
2 answers

Changing Tomcat web application context

I have a web application, which was designed and always worked under root context ("/"). So all css, js and links started with / (for example /css/style.css). Now I need to move this web application to some different context (let's say /app1). It is…
Denis
  • 93
  • 2
  • 5
4
votes
4 answers

Java servlet context root

Is it permissible to have multiple entries as the context root of a servlet? For instance, all Sun examples use a single /catalog or something similar as the context root, but could it be /catalog/furniture as well? The Servlet 2.4 Specification is…
Tim
  • 41
  • 1
  • 1
  • 2
4
votes
2 answers

Run with Netbeans (and Maven) the right context root

I've got a little problem when I run a project from my Netbeans 7.2 (I also use a Glassfish 3.1.2 Server) ... In fact I'm migrating existing projects from Ant to Maven, my pom.xml are finished and I've used the customisation of the context root as…
3
votes
1 answer

How to define a root context outside of the war in jboss 5.1?

To customise the root context of a web app in jboss 5.1 there is a documented way that describe how to add a jboss-web.xml file under the WEB-INF directory of the web application
3
votes
3 answers

Do we always need to use context.Server.MapPath? what if I cache the result?

I find it weird to use context.Server.MapPath every time just to determine physical location of some known directory/file under app_data folder. I have an understanding that once an application is running, it must not be possible to have its…
Varun K
  • 3,593
  • 2
  • 25
  • 26
3
votes
0 answers

How to make viewController ignore server.servlet.context-path

I have the following configuration for serving static content from Spring Boot. @Configuration public class WebConfig implements WebMvcConfigurer { @Value("${frontend.location}") private String frontendLocation; …
kswr
  • 57
  • 8
3
votes
1 answer

How set up a Context Path on a Jhipster (spring boot + angular) application

I generate a Jhipster project classic Spring Auth + Angular client application. I just need to set a custom context path "gateway" on a Jhipster application On the server i just set on the file…
4535992
  • 418
  • 9
  • 29
3
votes
2 answers

Output Context Node (full path) in XSLT 1.0?

For debugging purposes it would be handy to output the full path of the context node from within a template, is there unabbreviated xpath or function to report this ? Example Template:
monojohnny
  • 5,894
  • 16
  • 59
  • 83
3
votes
3 answers

How to get a context path of a properties file from a webservice in java?

I am trying read the context path of a properties file from my application, properties.load(this.getClass().getResourceAsStream(path)); import java.util.Properties; public class test1 { public String getValues() { …
3
votes
2 answers

Context path in URIs of static resources, do I really need to specify it?

I have a simple web app webapp static images - a.gif pages - test.html WEB-INF pages - test.jsp in test.html, there is the problem is that the image…
jnj
  • 755
  • 2
  • 11
  • 23
3
votes
1 answer

How to change react-router-component context root

I changed the web application deployment context path from / to /foo in web.xml, and react-router-component (not react-router) stopped working, giving the following error Uncaught Error: React-router-component: No route matched! Did you define a…
3
votes
2 answers

Struts2 anchor tag doesn't include contextPath

%{#request.contextPath} doesn't work inside an s:a tag in Struts2. (Struts 2.2.1 to be specific.) Is there a way to make it work? It works in other Struts2 tags. Here are two lines in a JSP file in a Struts 2 project whose context path is…
Brian Morearty
  • 2,794
  • 30
  • 35
3
votes
2 answers

How to rename Spring MVC Web App context root?

I'm trying to rename my Spring MVC web application. When I run it, there is an old name in the URL: http://localhost:8080/oldName/ In project Properties>Resource I set Path: /newName and also in Web Project Settings, Context root: newName But it…
jarosik
  • 4,136
  • 10
  • 36
  • 53
3
votes
1 answer

How can I use variable substitution in Tomcat's web.xml for the context path

Using Tomcat as my Servlet Container, how can I deploy two identical wars to different contexts and simply use the context path as the variable which will determine which properties file to load? I'm looking to do something like this in web.xml: …
noisebelt
  • 940
  • 2
  • 9
  • 20
1 2
3
14 15