Search This Blog

Monday, November 12, 2018

How to set Context path inside web application on Glassfish Java EE server

When you deploy your web application to Glassfish Java EE server, you can use the
--contextroot parameter.

Another way to set context root inside the application is to add a glassfish-web.xml file in the same folder as web.xml

<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
    <context-root>/i88ca</context-root>
</glassfish-web-app>