Deployment of more than one . War in the root context of Glassfish

Asked

Viewed 308 times

1

I have two applications that I need to deploy to Glassfish and I would like to know how to put both in the root context of the same Glassfish. I know that to put an application in root context, I must put the following line in glassfish-web.xml:

 <context-root>/</context-root>

So, whenever you access http://localhost:8080 will open my application. But how to deploy both in the root context? Will I have to change the port?

  • Which application should be opened when you access http://localhost:8080 ?

  • You want something like that? localhost:8080/Projeto1/projeto2??

  • Any of the applications, Alexandre. I need both to run without me having to put localhost:8080/project1 and localhost:8080/project2, so I can link to the right DNS. Both should look like this: {ip}:{port}/.

  • @Leopinheirodesouza ever looked over virtual Servers? I use the same glassfish with a website and a running system, but with a different domain name. If you sign in to the admin console and go to server Config > virtual servers > new >you can configure the ip that will be directed your application.

  • @Leopinheirodesouza, managed to solve this problem?

  • Deploy each application in its own context and create a virtual server for each.

Show 1 more comment

1 answer

0

I don’t quite understand what you want. Either way you can go to:http://localhost:4848/ (Glassfish console) and go to Applications and there you can see the different applications you deployed. Then just choose the application you want to run Launch.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.