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
9
votes
2 answers

Context Path in Jboss

There is a war deployed in JBOSS currently. If I want to figure out the context path for the WAR in Jboss, where should I be looking at? Server.xml?
Priyank
  • 14,231
  • 18
  • 78
  • 107
8
votes
1 answer

Eclipse, Tomcat project context root is eclipse folder

I'm having a little problem configuring my Tomcat Project. In short, I'm working on a Dynamic Web Page project but there seems to be some confusion as to from where I am running the application. Running the following code File f = new…
mahju
  • 1,156
  • 1
  • 14
  • 21
7
votes
4 answers

How to get ContextPath in init() method of Servlet version 2.4

I'm using version 2.4 of Servlet and I need to get the ContextPath through the init() method which is called on server start, so I don't have any Request object that could call getContextPath() and because the Servlet version I do not have…
Lama
  • 176
  • 1
  • 2
  • 7
6
votes
2 answers

SpringBoot adds context path to Actuator endpoints

I am running my springboot application by setting context-path to /myservice. This results into appending all my actuator endpoints exposed at the URL- http://localhost:8080/myservice/actuator/, while I want only http://localhost:8080/actuator/. Is…
6
votes
0 answers

How does Tomcat handle overlapping/shadowing names in context paths or URLs?

How does Tomcat 8.0 serve http requests in the following scenario? Let's say we have deployed the two web applications "ROOT.war" and "Foo.war" on a server with the name "www.host.com". Furthermore, let's assume that ROOT.war contains a subfolder…
Joerg
  • 790
  • 2
  • 10
  • 23
5
votes
1 answer

Get host and contextroot in class without HttpServletRequest

I´m currently creating a class for handling sending of mails. For some of these mails I need to construct links (account activation, reset password, confirmations etc). I don´t want to hardcode the host of the links, as the host will be different…
Daniel
  • 2,050
  • 7
  • 31
  • 55
5
votes
4 answers

Accessing context path(root folder) does not show login page in Spring Boot Application

In my Spring Boot(2.0) application, I have set the context path in my application.properties file as below server.servlet.context-path=/myApp Also, I have the following security configurations class extending WebSecurityConfigurerAdapter …
Sangeet Menon
  • 9,555
  • 8
  • 40
  • 58
5
votes
2 answers

EL context path evaluation difference between outputLink and graphicImage

I'm using the following to get a help document in our app. My problem is that while the evaluates the context path correctly, the h:outputLink evalutates it to nothing. I have tried using both $ and # in the h:outputLink because I…
Adam
  • 3,675
  • 8
  • 45
  • 77
5
votes
2 answers

Rails 3 routing based on context

I am trying to implement a "context" system similar to the one used by GitHub. For example, a Post may be created belonging either to the User or one of the Companies the User belongs to depending on whether to User is in the "User" context or a…
Michelle Tilley
  • 157,729
  • 40
  • 374
  • 311
5
votes
2 answers

Spring REST mock context path

I try to set the context path for spring rest mocks using the following code snippet: private MockMvc mockMvc; @Before public void setUp() { this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context) …
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
5
votes
2 answers

Templating and trying to reference context path from inside a CSS file

I'm working with JSF and XHTML templates, I'm using a CSS file in the templates, the background images being called like: background-image: url("../../images/imageFile.jpg"); Because I'm using templates I found out that I must keep same depth for…
Francisco Alvarado
  • 2,815
  • 2
  • 26
  • 51
4
votes
1 answer

How to set my webapp to appear as ROOTfor localhost:8080

I've got a webapp in my Tomcat/webapps directory. My app's directory is "site" and is showing as http:localhost:8080/site I'd like to have the site show as http://localhost:8080/ I've read the docs and tried creating a ROOT.xml file in my…
JLeonard
  • 8,520
  • 7
  • 36
  • 36
4
votes
1 answer

How do i determine the correct filesystem path

I am working on an application that has to download some external resources and make them accessible through a public/static directory in Ring. But.. I have a problem saving the resources into a static directory in my application, when developing I…
drankard
  • 129
  • 6
4
votes
3 answers

How to Use ProxyMatch or ProxyPassMatch with Regex for mapping multiple Context paths

I am using IBM's IHS Webserver built on top of Apache Web server Version 2.2.4. My requirement is to proxy pass a various Context path using regular expression in match. I tried using ProxyPassMatch but I get below error ERROR: "Invalid…
user3140950
  • 41
  • 1
  • 1
  • 4
4
votes
2 answers

Set context path irrespective for WAR version name in Tomcat

I am using Maven to build our application. So the war name will be MyTest-1.00-SNAPSHOT1.0 .If I deploy the same in Tomcat I have use the URL as //localhost:8080/MyTest-1.00-SNAPSHOT1.0 but I need to set the context path MyTest eventhough deployed…
Rithik_Star
  • 651
  • 5
  • 14
  • 39
1
2
3
14 15