Skip to main content

Overriding the target deployment directory?

2 replies [Last post]
kwutzke
Offline
Joined: 2006-03-08
Points: 0

Hello,

I'm naming my Eclipse projects like "Basketball Stats" or "PQ Generator" etc. The Eclipse GlassFish plugin (or Eclipse?) deploys to the respective directories on the server which causes an invalid URL exception upon webapp start.

Is there a way to manually set the target webapp deployment directory? Is it an RFE?

Karsten

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thomasmuch
Offline
Joined: 2004-09-29
Points: 0

Do you use WAR deployment on GlassFish 3.1? Then you might try adding a descriptor file "glassfish-web.xml" to your WEB-INF directory and set the "context-root" element appropriately. On GlassFish 3.0, the file is called "sun-web.xml".

If you use EAR deployment, you should set the "context-root" element under application/module/web in "application.xml" instead.

HTH, Thomas

kwutzke
Offline
Joined: 2006-03-08
Points: 0

Hello,

I haven't tried it, are you sure this will change the directory name to which the webapp is deployed? Note I'm not asking for the context name as in the browser URL. You can set that in Eclipse under Project -> Properties -> Web Content Settings -> Context root: ... and the GF plugin will pick that up.

Karsten

PS: I'm using unzipped directory deployment (localhost), more or less WAR (same structure)