Best way redirect REST service request on glassfish + JAX-RS to https URL? -


i have implemented rest service on glassfish4 + jax-rs. want use https connection authentication.

the uri http http://myhost/myapp/services/rest/myservice , https https://myhost_2/myapp/services/rest/myservice. want prevent usage of http://myhost/myapp/services/rest/myservice.

i think 1 way redirect request on http://myhost in rest jax-rs class https://myhost_2. way? how can implement this?

you answer requests http 301 (moved permanently, telling client use new location in future requests) pointing https equivalent in location header of response.


Comments