facebook

context root not being correctly set on deployment

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #338139 Reply

    Michael Stacey
    Participant

    Using ME 2013, when a web application is deployed to Glassfish, the context root is set to “/app.war” rather than “/app” as set in MyEclipse->Project Facets->web->Context root. Why?

    #338180 Reply

    support-swapna
    Moderator

    stacey11,

    Glassfish seems to have changed the autodeploy naming conventions. Before 3.1.2 MyEclipse would create domain/domain1/appname.war and you could access it at http://localhost:8080/appname. Now, you will need to access it at http://localhost:8080/appname.war.

    Our dev team is looking at this issue. As a workaround, you can specify the context root in a glassfish-web.xml file. This file should be in the WEB-INF directory, alongside the web.xml file. Here is a sample, for just setting the context root:
    Code:
    <!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”&gt;
    <glassfish-web-app>
    <context-root>appname</context-root>
    </glassfish-web-app>

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: context root not being correctly set on deployment

You must be logged in to post in the forum log in