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 ?
– Alexandre Strevenski
You want something like that?
localhost:8080/Projeto1/projeto2
??– Wellington Avelino
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
@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.– Wellington Avelino
@Leopinheirodesouza, managed to solve this problem?
– Wellington Avelino
Deploy each application in its own context and create a virtual server for each.
– Orlando Correa