Reputation: 4506
This is the first time I am using a Google App Engine jetty server. I have deployed a webapp on jetty which was initially running on tomcat.
In tomcat the url pattern is localhost:8080/ProjectName/index.jsp
But in jetty it cuts out the ProjectName in the browser url, due to this the jsp in not able to read the resources
<link href="${pageContext.request.ContextPath}/css/bootstrap/bootstrap.css" rel="stylesheet" type="text/css"/>
I have remove to ${pageContext.request.ContextPath}
in order to run on GAE Jetty. Is there a way to fix this? I need to use the jsps as is.
Upvotes: 0
Views: 373
Reputation: 49462
The value of request.ContextPath
is the value of the contextPath
that the webapp was deployed to.
If your webapp was deployed to a context path of /
(root or default context path), then your ${pageContext.request.ContextPath}
is ""
per the spec.
See the javadoc for javax.servlet.http.HttpServletRequest#getContextPath()
Local GAE testing is usually on the /
context path.
Also note that the typical deployment of your GAE webapp to {appname}.appspot.com
would also be to the /
context path.
Upvotes: 1