It turns out that when using an EAR file, it doesn't matter what you put in the WSDL, in web.xml, or in sun-web.xml. The context root is controled instead by application.xml. In Netbeans, right-click on the enterprise application (EA) project, and select new and “Standard Deployment Descriptor”. This will create an application.xml file, in the project, based on your current web.xml. This application.xml file can be edited to set the context root.
When using a WAR file, the context root is controled by the usual deployment descriptor, as one might expect. An easy why to set a WAR file's context root, after deployment, is through the Glassfish server administration console. Go to "Applications" and "WebApplications" (on the left side of the administration page), click on the name of your application and you’ll be able to change the "Context Root" option. Then click “Save”.
No comments:
Post a Comment