I developed a dynamic web project in Eclipse. I can access the app through my browser using the following URL:
http://localhost:8080/MyDynamicWebApp
I tried out solution suggested by Russ Bateman Here in the post
http://localhost:8080/Myapp
to http://localhost:8080/somepath/Myapp
But Didnt worked for me as I needed to have a *.war file that can hold the config and not the individual instance of server on my localmachine.
Reference
In order to do that I need jboss-web.xml placed in WEB-INF
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2008 Object Computing, Inc.
All rights reserved.
-->
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
<jboss-web>
<context-root>somepath/Myapp</context-root>
</jboss-web>