i’m developing a webservice with ejb 3 and glassfish 3.1.1. I’m using Netbeans 7.0 and would like to know, how to enable https on port 8181 for this webservice.
I dont need any authentication method, just secure the communication through https!
Thx
Adem
You need to specify a secure connection as explained here. Essentially, in your deployment descriptor web.xml you need to set:
However
NetBeanswill insert the code for you: openweb.xml, click the Security tab along the top of the editor, then click the Add Security Constraint button. Type a name, in URL pattern write /*, set All Http Methods, and specifyConfidentialas Transport Guarantee.If you don’t have
web.xml, because you are deploying just the Enterprise Java Bean, create a New GlassFish Descriptorglassfish-ejb-jar.xmland fill it like this (or see here the file hierarchy):Your application will use port 8181 from now on.
See here for further information about how to setup security in a Netbeans web application and here for learning about certificates.