0

Suppose I have two applications front-office.war and back-office.war.

I want to deploy them on one application server. And I want them to be accessible on different ports. Then I can put a filter on the firewall to be sure that front-office is visible to everybody but back-office is visible only internally.

I saw that it's possible on Tomcat but it looks more like a hack. It's also possible on Jboss but it's even more hacky.

My question is: why such a possibility is not in the standard? According to the standard we can choose the application's context root (URL) but not the port. Why don't they give the possibility to choose the port as well?

Of course, I can deploy two applications on two AS. But for some reasons: maintenance, easiness of deployment, configuration, license issues, etc, I want them to be deployed on a single AS.

I can filter the incoming requests also by the URL but for me it's easier to suppose that port filtering is already in place. So I have nothing to do with the firewall configuration.

Community
  • 1
  • 1
Oleg Pavliv
  • 20,462
  • 7
  • 59
  • 75

1 Answers1

0

If you use two ports you have to run two instance of JBoss.Example you can run two applications in 8080 and 8081.Then you can block the 8081 for external users.(Available for only internal users)

If you want to run it in same jboss instance with same port you can use the URL based blocking mechanism.

Example if you deploy the two application in port 8080,then you can simply block the url https://stackoverflow.com/back-office/* for the external users. Other application https://stackoverflow.com/front-office/* will be available for all users.

Community
  • 1
  • 1
swgkg
  • 184
  • 5