I could use this solutioin also.
First, use the -b run option to bind the app server to your IP address. For example (assuming your IP address is 220.127.116.11):
./run.sh -b 18.104.22.168
Note that only URLs for that IP address will work (that is, localhost will no longer work). If you want localhost to work also, use 0.0.0.0 as the IP address:
./run.sh -b 0.0.0.0
Second, to change the context name (get rid of the MyApp in the URL), for your application add a jboss-web.xml file to the WEB-INF directory of your war file and set the following:
<jboss-web> <context-root>/</context-root> </jboss-web>
Or if you have an ear with an application.xml, you could set the context there.
In addition, remove the existing root application, you can find it at server/xxx/deploy/jboss-web.deployer/ROOT.war. Either remove that whole directory, or change its context root to something other than "/".
I cannot thank you enough for this. I've spent lot of time looking for documentation on this really.
However, could you please let me know how to get rid of port 8080 as well?
I still had to use 8080 in the url with the procedure you listed (both steps worked beautifully). I'm running JBoss on Windows Vista. Can I use port 80? If so, what all changes should be made to achieve this?
Thank you once again !
Oops, missed the port 8080 part. You can change this in the file server/xxx/deploy/jboss-web.deploy/server.xml, change the Connector port from 8080 to 80. You should also do a search for 8080 in all of the *.xml files and change those to 80.
Just noticed that you are running Windows Vista. You should re-read the EULA you agreed to when you installed Vista - it prohibits you from having more than 10 incoming connections. This means a maximum of 10 users can be (legally) connected to your web site at any one time.
THANK YOU Peter once again for all your help. This resolved my issues.
I didn't know about that EULA until now. It is very strange. Probably, I'll switch to Linux.