You need to define other filters for js, style and img.
Something like that:
<rule> <from>/img/**</from> <to>/img/$1</to> </rule> <rule> <from>/js/**</from> <to>/js/$1</to> </rule> <rule> <from>/style/**</from> <to>/style/$1</to> </rule>
These filters must be declared before the one you define for the user. These rules will correspond to those that apply to the filter, and your problem should be resolved.
Edit
Regarding your comment: this user, which can be seen on the print screen, is somehow added by the filter.
I think this is wrong, I mean that the filter is not the one that adds βuserβ to the filter. I think the problem is how you import your resources.
Perhaps you are doing something like this:
<script type="text/javascript" language="javascript" src="resources/js/lang.js"></script>
In this example, see how a relative URI does not suit your application context and starts without a slash. When you use such a URL, the browser will look for the resource in the path relative to the actual path. If you have http://localhost:8080/roqlet/user in your browser, the result will be http://localhost:8080/roqket/user/theResource (assuming "roqket" is the context of your application).
So you should do this:
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <script type="text/javascript" language="javascript" src="${ctx}/resources/js/lang.js"></script>
Now, when you specify the context, the URI will be created relative to it, and not the actual one: http://localhost:8080/roqket/theResource
Look at the doc .
source share