sdoca
sdoca

Reputation: 8042

How to Publish war to Glassfish in Eclipse

I am trying to make use of the ability to hot-deploy/publish web apps to Glassfish via Eclipse. I am using Helios distribution of Eclipse with Glassfish v3. I have set up the Glassfish server in Eclipse. I have a servlet app (war) that I have been deploying manually via the Glassfish admin console, but would like to make changes and have them hot-deployed to the server.

I set the project to use facets and made it a dynamic web module. It's now available to add as a resource to my server. I have confirmed that when I add/remove the resource from the server it is added/removed in Glassfish in the list of applications in the admin console. I've set my server to "Automatically publish when resources change".

However, when I try to access the app I get a 404 error. This is even when I choose to "launch" from the admin console.

Could somebody tell me what step I'm missing? Is there a good, straight-forward resource that explains how to do this?

Thanks!

Upvotes: 3

Views: 5465

Answers (2)

Gus Vargas
Gus Vargas

Reputation: 11

I had had the same problem as you, I don't know what exactly the error was but I have 2 theories

1: The glassfish connector had been installed wrongly 2: There is a conflict between the glassfish connector and the subclipse plugin, in specific the JavaHL dependency

So I unzipped the eclipse again, then I opened it and as soon as it had started I installed the glassfish connector, restarted and try again with a 'hello world' dynamic web project, which had deployed successfully. Then I installed again the plugins (checkstyle, findbugs, subclipse, cobertura etc...) and now its working, hope this helps.

Upvotes: 1

JOTN
JOTN

Reputation: 6317

Check the glassfish server log. It's possible the application did deploy but some exception is preventing it from working. You can always deploy it manually using asadmin or the admin web page to make sure it's deployed and then try it. If that works then look at eclipse related problems.

Upvotes: 0

Related Questions