users@glassfish.java.net

context-root parameter ignored in glassfish-web.xml

From: <forums_at_java.net>
Date: Fri, 19 Aug 2011 14:12:17 -0500 (CDT)

I created a new "Dynamic Web Project" in eclipse. Used the OEPE plugin to
deploy to Glassfish 3.1 and 3.1.1. Even though I try to override the context
root in the glassfish-web.xml (or sun-web.xml for that matter), Glassfish
maintains the default context URL for the application. I can change and save
it in Glassfish using the console, but that is overwritten the next time I
deploy.

Steps to repeat.

(1) Create a new Dynamic Web Application in Eclipse.

(2) Modify the sun-web.xml to set context root to "/anything".

(3) From the servers pane, right click on the server and select Add/Remove to
deploy the app.

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC "-//Sun
Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<glassfish-web-app error-url=""> <context-root>/lookhere</context-root>
<class-loader delegate="false"/> <jsp-config> <property name="keepgenerated"
value="true"> <description>Keep a copy of the generated servlet class java
code.</description> </property> </jsp-config> </glassfish-web-app>

--
[Message sent by forum member 'schnocky']
View Post: http://forums.java.net/node/835558