I am new to Java EE and I am developing a RESTful api in wich every api call the user sends encoded credentials. My problem is how to implement https protocol over default http and make my connection secure. I am using Jersey restful web services and Glassfish web server.
Thanks.
解决方案
That's more a setup/configuration question, isn't it? You use HTTPS (TLS) because you set it up in your server, then your REST endpoint will be used/changed accordingly...and the (encoded) credentials can be sent as usually, whether the connection is encrypted or not.
UPDATE:
Since you didn't specify the Glassfish version, I'll assume you are using a "recent" version. Have a look at this article.