0

I´m using spring mvc, I have got a project (Apliconta2Web) and your url is //Apliconta2Web/, but if i copy this project and change your name by (Apliconta3WebPrimefaces) when i push button run as i want url //Apliconta3WebPrimefaces/ but always i have got //Apliconta2Web/. I have changed servlet-name. and add server the name is Apliconta3WebPrimefaces(Apliconta2Web) How i can change it? Very thank. sorry by my english. i´m learning.

web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

    <display-name>Aplicacion Web Apliconta3WebPrimefaces</display-name>

    <servlet>
        <servlet-name>apliconta3webPrimeFaces</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>/WEB-INF/app-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>apliconta3webPrimefaces</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.htm</welcome-file>
    </welcome-file-list>

</web-app>
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
ProSyth
  • 167
  • 1
  • 5
  • 17
  • 3
    if you are deploying the application in tomcat then the application context name will be same as your war file name or exploded directory name that is deployed onto tomcat. – Chaitanya Oct 24 '14 at 09:56
  • Thanks to your comment I found the solution. http://stackoverflow.com/questions/2437465/java-how-to-change-context-root-of-a-dynamic-web-project-in-eclipse – ProSyth Oct 24 '14 at 10:29

0 Answers0