web applications - Java web app serve both secure and insecure resource -


i writing java web app (spring 3.2).

basically, have several sites need access web service. these sites mixture of both secured (ssl) , insecured. have endpoint /validate/{id} should respond both secured requests

 (https://localhost:8443/ws/validate/123 , http://localhost:8080/ws/validate/123) 

how do this? i've added

<security-constraint>     <web-resource-collection>         <web-resource-name>ws</web-resource-name>         <url-pattern>/*</url-pattern>     </web-resource-collection>     <user-data-constraint>         <transport-guarantee>confidential</transport-guarantee>     </user-data-constraint> </security-constraint> 

to web.xml, forces ssl ( calls 8080 302 found response location header pointing 8443.

how allow both secured , insecured requests on same endpoint (with different ports)?

 <transport-guarantee>none</transport-guarantee> 

seems have done trick...


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -