-1

While using Glassfish 3, I could access all files on root such as localhost:8080/index.jsp but after installing GlassFish 4 I need to add the project name, localhost:8080/projectName/index.jsp how to take that out?

Roman C
  • 49,761
  • 33
  • 66
  • 176
J888
  • 1,944
  • 8
  • 42
  • 76

2 Answers2

1

Go to administration console (i.e. localhost:4848) > select deployed application from Applications menu > Type in Context Root name for your project (i.e. /projectName). Click Save.

Branislav Lazic
  • 14,388
  • 8
  • 60
  • 85
  • I've changed the context root to / and restarted the glassfish to re-deply the application but it still has the project name in the address, and when I checked the context root it was returned to its previous value, (/ProjectName) – J888 Nov 28 '13 at 02:36
0

Rather than changing it in administration console (As Brano suggested) you can set the value of context-root tag to / by editing your glassfish-web.xml file or adding it to the file as following.

<glassfish-web-app error-url="">
  <context-root>/</context-root>
  <class-loader delegate="true"/>
  <jsp-config>
AlexCartio1
  • 238
  • 3
  • 9
  • 29