English 中文(简体)
部署一个版本的WAR档案,以便编目
原标题:deploying a versioned WAR file to tomcat

I was wondering what would be the best practice to deploy a maven packaged WAR file to tomcat. Using maven release plugin I get a versioned war file for my project eg: myservice-1.0.0.war

I would like to deploy it to tomcat so that I can access it as follows eg: http://localhost:8080/myservice

在发生违约时,将战争档案作为目录,在CATALINA_HOME/webapps下,名称为我的服务-1.0.0。 但是,出于上述原因,我想以我所服务的国名来探讨战争。

我知道,我只能改称我的服务-1.0.0.war >>我的服务。 战争,然后在Tomcat部署。

我想找到其他人做些什么?

最佳回答

I would do it by mentioning myservice as artifactId and final name and using maven cargo plugin to deploy to tomcat. http://cargo.codehaus.org/Maven2+Plugin+Tips

问题回答

您可提供文件/META-INF/context.xml,内容类似:

<?xml version="1.0"?>
<!DOCTYPE Context>
<Context path="myapp">
</Context>

rel=“nofollow”http://tom.apache.org/tomcat-5.5-doc/config/context.html

我也遇到了同样的问题。 对我而言,在货物可部署配置中添加了这一特性要素:

                    <deployable>
                        <groupId>org.something</groupId>
                        <artifactId>something-idm-esb</artifactId>
                        <properties>
                            <context>something-idm-esb</context>
                        </properties>
                        <type>war</type>
                    </deployable>

如果没有这一财产要素,这笔钱将部署到当地东道方:8080/左右-idm-esb-0.9.14。 有了房地产科,该套设备被部署到当地东道方:8080/左右-idm-esb。

不要重新命名战争档案,你可以这样做:

仅添加以下内容:<Host>Host>Host> tags。

页: 1

<Context path="/myservice" docBase="/myservice-1.0.0" debug="0" reloadable="true"></Context>

Reference





相关问题
Tomcat´s server.xml dynamic configuration

My web application uses the same database configuration as the application XYZ. I have a resource declaration for a context in server.xml, so I have a duplicated configuration (once for web ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...

热门标签