0

I've got a Spring MVC Maven project written in Eclipse that was verified as working with an Apache Tomcat 7 as the web container.

I am trying to transfer it to my "server" pc where I want to deploy it to the my existing glassfish (4.1) server as the web container.

I am having a very hard time finding a big enough partial answer to get the rest of the way.

I have tried to just export the .war file to the autodeploy folder which resulted in a "deployfailed" file.

I have tried to setup a "new server" using glassfish tools, but I realized that this is creating a new server and the existing server blocks the socket connection.

Eclipse doesn't see to have standard web commands like build, clean or deploy, but I would happily settle for advice on how to tell it to deploy to the existing glassfish server similar to how I was able to with tomcat at my training location.

Kamurai
  • 143
  • 2
  • 4
  • 19

1 Answers1

0

Check this answer. Then follow the following steps.

  1. Go to the project in the Project Explorer.
  2. Select the web project.
  3. Right click and select "Run As", you will see glashfish. Select it and click run.
  • Thank you, I tried this previously, but I don't remember if I restarted. The problem was that it wouldn't connect to the existing server if it was already running. I don't want glassfish dependent on Eclipse to run. – Kamurai Oct 11 '17 at 14:16
  • Apologies, I don't know what I actually did, but I tried again today and it actually is recognizing the running Glassfish server this time, which is good. Unfortunately, it is not letting me publish the application: 'Publishing to GlassFish 4 [domain1]...' has encountered a problem. cannot Deploy [application] – Kamurai Oct 11 '17 at 23:41
  • Okay, removed the application from the server resource and the application actually deployed, but I'm not able to see views for it yet. – Kamurai Oct 12 '17 at 00:00
  • I can now access the views, but the name of the application is wrong. This has been a funny series of events, but I think its enough to confirm this answer is correct. Thanks for the help. – Kamurai Oct 12 '17 at 00:16