users@glassfish.java.net

How to configure a REST sevice to use HTTPS?

From: <forums_at_java.net>
Date: Mon, 13 Feb 2012 12:08:25 -0600 (CST)

Sorry if this is a dumb question, but I'm hunting to figure out how to
configure my REST service so that it can only be accessed over SSL/HTTPS.

I've already been through the steps to configure glassfish (which I guess
just passes the config through to grizzley) with certificates so that it
works properly with https.  I can browse to my machine with https on port
8181 and I get the "your server is running" page from glassfish with no
errors, so that works.

Now, I have a simple test REST service (based on the "CustomerDB" netbeans
tutorial).  Right now it's accessible on port 8080.  How do I tell
glassfish that I only want this service to be available on port 8181 via SSL?

I'm guessing the answer is something in a web.xml or other deployment
descriptor, but deployment descriptors are somewhat of a mystery to me. 
I've always relied on the tooling to generate them for me. 

Any help would be appreciated!

Thanks,

Duncan

 


--
[Message sent by forum member 'duncant']
View Post: http://forums.java.net/node/883489