84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
这两个项目如下图所示,为Struts2Action 和Struts2Project,之前Action是从project复制过来,确实存在相同ContextRoot的情况,但我现在已经将action的ContextRoot修改好了,如下图
并且在工具栏project中使用clean,清理了一下,但仍然不了在tomcat 中发布,错误的图片为下图
人生最曼妙的风景,竟是内心的淡定与从容!
your tomcat中已经存在一个上下文为/Struts2Project的项目了,找到tomcat的目录查看一下webappsdirectory, delete it.
tomcat
/Struts2Project
webapps
If you publish the project through server.xml, you can delete its corresponding configuration.
server.xml
Expand the servers folder in your picture. Find server.xml
Scroll to the bottom to find the <Context> tag, and delete the duplicates.
<Engine defaultHost="localhost" name="Catalina"> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>--> <Realm className="org.apache.catalina.realm.LockOutRealm"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/></Realm> <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log" suffix=".txt"/> <Context docBase="xweixin-web" path="/xweixin-web" reloadable="true" source="org.eclipse.jst.jee.server:xweixin-web"/> </Host> </Engine>
I have it. If not, look for it in server.xml in the tomcat directory.
Just change the .project in the project root directory... and the project name in a few files
your
tomcat
中已经存在一个上下文为/Struts2Project
的项目了,找到tomcat
的目录查看一下webapps
directory, delete it.If you publish the project through
server.xml
, you can delete its corresponding configuration.Expand the servers folder in your picture. Find server.xml
Scroll to the bottom to find the <Context> tag, and delete the duplicates.
I have it.
If not, look for it in server.xml in the tomcat directory.
Just change the .project in the project root directory... and the project name in a few files