复制Spring Web项目

时间:2015-01-03 04:13:29

标签: java eclipse spring web web.xml

我想在eclipse上克隆我当前的spring web项目并创建略有不同的版本。我尝试这样做是因为它比创建新项目和将所有以前的项目文件添加到新项目更容易。但是,当我运行该项目时,它仍然在浏览器上运行上一个项目的域。 enter image description here

On the browser I see http://localhost:8080/Product_Catelog_Spring/
instead of http://localhost:8080/Test_Product_Catelog_Spring/

克隆项目的Web.xml:Test_Product_Catelog_Spring

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Test_Product_Catelog_Spring</display-name>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring-beans.xml</param-value>
    </context-param>

    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/application-servlet-config.xml</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.aspx</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>default.aspx</welcome-file>
    </welcome-file-list>

</web-app>

0 个答案:

没有答案