...
Deploy the application
At this point you have configured Geronimo to use two different Virtual Hosts, one of them is also configured to listen under additional aliases. All you need to do now is to deploy the applications and test them. To deploy the applications type the following commands from the <geronimo_home>\bin directory:
java -jar deployer.jar --user system --password manager deploy <app_home>\HelloWorld_1.war
You should get a successful confirmation message similar to this one:
No Format bgColor #000000 borderStyle solid
D:\geronimo-1.1\bin>java -jar deployer.jar --user system --password manager deploy \000-VH-sample\HelloWorld-VH\HelloWorld_1.war
Deployed sample.applications/HelloWorldApp_1/1.1/war @
http://hc2t60p:8080/hello_1
Note that the deployer tool will not tell the Virtual Host where the application was deployed to, it will only tell the machine's defined host name. If you try to access that URL you should get a HTTP Status 404 - /hello_1, resource not available. That error message is a good sign since we deployed the application to a particular Virtual Host.
Repeat the deployment for the second application.
java -jar deployer.jar --user system --password manager deploy <app_home>\HelloWorld_2.war
You should get a successful confirmation message similar to this one:
No Format bgColor #000000 borderStyle solid
D:\geronimo-1.1\bin>java -jar deployer.jar --user system --password manager deploy \000-VH-sample\HelloWorld-VH\HelloWorld_2.war
Deployed sample.applications/HelloWorldApp_2/1.1/war @
http://hc2t60p:8080/hello_2
So, with the applications deployed the only thing left is to test them. Test hello_1 first, try to access the hosts names defined on the Geronimo server machine:
Host name / Virtual Host | Status |
---|---|
http://hc2t60p:8080/hello_1 | Fail |
http://localhost:8080/hello_1 | Fail |
http://virtualhost1.com:8080/hello_1 | SUCCESS!!! |
http://virtualhost2.com:8080/hello_1 | Fail |
http://virtualhost3.com:8080/hello_1 | Fail |
http://virtualhost4.com:8080/hello_1 | Fail |