开发者

How do you deploy a .war file to a deep path in jboss?

开发者 https://www.devze.com 2023-02-15 11:57 出处:网络
I have a project containing a .jsp that uses a JavaBean, but does not use a servlet.I am trying to deploy it to servername:8080/path/projectname.Unfortunately I can only figure out how to deploy it to

I have a project containing a .jsp that uses a JavaBean, but does not use a servlet. I am trying to deploy it to servername:8080/path/projectname. Unfortunately I can only figure out how to deploy it to servername:8080/projectname. I have tried both editing my web.xml file to /path/projectname, and physically开发者_如何学Python creating directory .../deploy/path with /projectname in my web.xml file. Does anyone have any suggestions as to how I can deploy a project to a particular path?

Thanks a lot!


I've packed up several WAR files but never deployed one! They are only compressed archives, can't you uncompress it (with Winrar or similar) and just copy the files to the appropriate path?


The WAR specification does not contain a standard way to tell the web container which URL a WAR file maps to, except the Tomcat convention that foo.war maps to /foo. You need to have the WAR inside an EAR as the EAR can do that.

Hence you need a web container specific solution. For JBoss it appears to be having the following in jboss-web.xml

<jboss-web>
    <context-root>...</context-root>
</jboss-web>

I have not tried with JBoss so I cannot say if it can deep deploy. See the documentation at http://docs.jboss.org/jbossas/guides/webguide/r2/en/html/ch06.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号