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

Popular posts from this blog

xslt - Substring before throwing error -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

oracle - Changing start date for system jobs related to automatic statistics collections in 11g -