By clawing through the source code, I found an undocumented XML element that you can add to jboss-web.xml to explicitly define the path under which the webapp is deployed (which you place in the WEB-INF dir, same as web.xml)
not quite sure why this isn't in the DTD or in the JBoss 3 docs ...
I have added my.war file under portal.sar. Also have added the jboss-web.xml under my.war to have the root-context as portal. I am not able to access my.war with any URL. Almost tried many combinations.
Can anyone help me how to use portal context for the web application in the Portal
There are several ways to do this.
If your webapp is part of an EAR file, then the webapp's context root can be defined in the EAR's META-INF/application.xml file (see: http://docs.jboss.org/jbossas/guides/webguide/r2/en/html_single/#d0e777).
<application> ... <module> <web> <web-uri>my.war</web-uri> <context-root>m</context-root> </web> </module> </application>
If your webapp is not packaged in an EAR, but deployed as just a webapp, then the context-root can be defined in WEB-INF/jboss-web.xml of the webapp.
<jboss-web> <context-root>my</context-root> </jboss-web>
You don't typically deploy a webapp inside of a SAR since this is a service archive (at least I'm not familiar with that practice), either wrap the webapp in an EAR, or deploy it singularly.