Reputation: 259
I want make permanent redirect from http:// myurl to https:// myurl, but in Jetty I find only MovedContextHandler, with it I can redirect only context path, for examnple from myurl/bla to myurl/bla/bla
<Configure class="org.mortbay.jetty.handler.MovedContextHandler">
<Set name="contextPath">/bla</Set>
<Set name="newContextURL">/bla/bla</Set>
<Set name="permanent">true</Set>
<Set name="discardPathInfo">false</Set>
<Set name="discardQuery">false</Set>
</Configure>
but how can I work with prefix of url?
Upvotes: 3
Views: 4836
Reputation: 49545
Best handled in your /WEB-INF/web.xml
<web-app>
...
<security-constraint>
<web-resource-collection>
<web-resource-name>Everything in the webapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
</web-app>
Upvotes: 6