Details
-
Bug
-
Resolution: Done
-
Major
-
1.0.0.M7
-
None
Description
GET requests to static files (CSS for instance) are handled by the Route.
The was discovered when the context path of a request changes. In this case Sebastian has added page where users can be registered, register.jsp. This page will display a list of users which are links:
<a href="show/${user.id}">${user.id}</a>
The is a route for handling /show/id so these will work just fine.
show.jsp like the others pages includes header.jsp which has the following includes:
<link rel="stylesheet" href="stylesheets/base.css"> <link rel="stylesheet" href="stylesheets/skeleton.css"> <link rel="stylesheet" href="stylesheets/layout.css">
When accessing show.jsp for a user the following errors are displayed in the browsers console:
GET http://localhost:8080/aerogear-controller-demo/show/stylesheets/base.css 404 (Not Found) beve:21 GET http://localhost:8080/aerogear-controller-demo/show/stylesheets/skeleton.css 404 (Not Found) beve:22 GET http://localhost:8080/aerogear-controller-demo/show/stylesheets/layout.css 404 (Not Found)
One workaround might be to have absolute paths in header.jsp:
<link rel="stylesheet" href="${pageContext.request.contextPath}/stylesheets/base.css">
This task should investigate if there are other options.