Webnet Webnet - 1 month ago 5x
Java Question

How to remove my application name from the URL?

When I go into my Glassfish admin panel I go to Applications and I see my application listed (named

). When I click Launch it opens a tab with some URLs. There are a few issues with these URLs I'm struggling to find answers for on how to fix.

  1. I only want HTTPS, not http. Is this controller on the server or application level?

  2. These URLs have
    on the end of the domain name. I really need the user to access my application on the base url without having a
    on the end. How can I control this?

Thanks for your help!


As to your first question, if you want to require SSL connections to your web application then you are going to have to do some additional server configuration. I will refer you to this tutorial.

For your second question, change your web.xml and set its context root to /: