Reputation: 49087
I am specifying a context root as the XML below shows. It does not work however when I upload the war file manually in the Glassfish admin web console. If I deploy it through the maven plugin for glassfish it works. It seems like Glassfish does not read the file and use the default name...Am I missing something or is this (yet another) a bug? I am using Glassfish 3.1.2.2 build 5.
glassfish-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<context-root>myContextRoot</context-root>
</glassfish-web-app>
Upvotes: 3
Views: 4181
Reputation: 11460
Yes this is an issue of Glassfish. The admin web console have an own text field for the context root which will be auto filled with the name of the war file not his config. When you hit the deploy button this value overwrites the context-root from your config file. But the asadmin deploy and all plugins ant, maven ... are working OK.
Upvotes: 5