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

Zuul Route Definition

I am having a small issue in getting the Zuul route config correct. Here's what I have currently zuul: routes: microservice: path: /service/* serviceId: session sensitiveHeaders:…
vasanth
  • 81
  • 7
2
votes
1 answer

Server context-path and images url in CSS

I developped a spring-boot application using thymeleaf as template. I use server context-path in my application.properties. server.context-path: /myapp/v1.0 When I need to display images in my views.html I use this syntax
Amine Hatim
  • 237
  • 2
  • 7
  • 19
2
votes
2 answers

How to set context path in context.xml

I have to deploy my app.war file in tomcat 7. The .war file name is followed by its version no. Here I need to set up a context path, so that the actual url will contain only the app name(without version no). My requirement is that, there should be…
Aldrin Rodrigues
  • 151
  • 1
  • 11
2
votes
1 answer

Getting web app context information after project deployment without hitting web endpoint

I have a package for internal use that when added to a project needs to send a notification to our QA application that it is live, and at what endpoint it is available. To that end, I need to get the context root of the project. The problem What I…
Tyler
  • 197
  • 3
  • 13
2
votes
1 answer

How to set Spring root context path

I am a Spring newbie and am putting together a Spring web-app (not Spring-boot - how much difference does this make?). Deployment is on a Tomcat 7 server. The app is up and running. My problem is that is only accessible via the standard…
Steve Cohen
  • 4,679
  • 9
  • 51
  • 89
2
votes
1 answer

${pageContext.request.contextPath} works fine local, but shows blank live

Currently I am using ${pageContext.servletContext.contextPath} or ${pageContext.request.contextPath} to print the context path on the JSP page. It is working fine for the local server, but when I go live it prints blank instead of the actual…
2
votes
1 answer

Specifying Locations relative to the context XML in Spring

Is there a way to reference a properties file on a file system (not on a classpath) relative to the Spring's context file itself? What I want to do is the below:
Daisuke Shimamoto
  • 5,206
  • 6
  • 32
  • 37
2
votes
3 answers

Change the path of application in Tomcat 6

I have my web application whose name is myApp.war. I copy my war file in $CATALINA_BASE/webapps. Now I can open my site using the URL: http://localhost:8080/myApp/ However I want to change the path of my application (for example: newName), so I add…
stevey
  • 1,137
  • 4
  • 21
  • 30
2
votes
2 answers

Add virtual folder to web dynamic project

Right now I am trying to accomplish a project on Eclipse Juno and Tomcat 7 that requires to have a "virtual folder" to hold multimedia files (like images, other sub-pages,etc.). I already have some methods to give out the file path in a URI based…
John
  • 311
  • 4
  • 17
2
votes
1 answer

Relative or absolute path on JSP?

I'm trying to make a homepage with a head and a tail jsp files in the root. Also I have the same _head and _tail jsp just for simple use at the future if I need it. In the head jsp, I added two js files, one css files in it. I made another folder on…
Steve Gom
  • 75
  • 3
  • 9
2
votes
2 answers

How do i link to my Image-Folder inside my Apache Wicket Application?

My Package-Structure looks like: src/main/java src/main/resources src/test/java src/test/resources src/main/webapp/css src/main/webapp/images src/main/js src/main/WEB-INF My images are stored under src/main/webapp/images. Now i want to dynamically…
lazydaemon
  • 2,429
  • 2
  • 17
  • 12
2
votes
3 answers

Obtaining a context path in a non-servlet class

In my webapp I am using Quartz to call a method defined in some class at some interval, that method as one of the arguments takes a path to a css file in my WebContent directory. My question is how can I obtain the path to that css file from a…
SneakyMummin
  • 683
  • 1
  • 11
  • 30
1
vote
0 answers

How to change context path in java file

i have signature.java file . It is having an init method. Here i need to change static context path to dynamic contextpath. Here myweb is the contextpath. private void init() { setHost("/myweb/startApplication.do"); } Thanks in Advance.
Mdhar9e
  • 1,376
  • 4
  • 23
  • 46
1
vote
1 answer

Python XPath / libxml2 namespace query

I have been trying to parse the London Underground Linestatus XML "feed" - with little success. I would have expected this to ne "easy" using XPath, but I am getting empty nodes. I am fairly sure sure that I am not dealing with the uk namespace…
chocksaway
  • 870
  • 1
  • 10
  • 21
1
vote
1 answer

How to set context path of web application in IntelliJ IDEA

I have a project using Jakarta EE and I'm trying to set a contextual path, but I can't do it. When setting the context path in the web.xml, everything works the same as without it. If you try to get it through ServletContext.getContextPath(), then…