Why do I get two different Project Context for my Spring mvc web application?
-
Following is my pom.xml <project xmlns="Page on apache.org" xmlns:xsi="Page on w3.org" xsi:schemaLocation="Welcome to Apache Maven/POM/4.0.0 Page on apache.org"> <modelVersion>4.0.0</modelVersion> <groupId>com.MyStartUp.www</groupId> <artifactId>MyStartUp</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>MyStartUp Maven Webapp</name> <url>Welcome to Apache Maven</url> <properties> <spring.version>4.0.2.RELEASE</spring.version> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-mongodb</artifactId> <version>1.6.0.RELEASE</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-api</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-core</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-jsp</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>org.apache.tiles</groupId> <artifactId>tiles-servlet</artifactId> <version>2.2.1</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> </dependency> </dependencies> <build> <finalName>MyStartUp</finalName> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </pluginManagement> </build> </project> I use tomcat server v7.0 to deploy and I use maven to build. Whenever I make a change I go to maven terminal and use "mvn clean install" and go to localhost:8080/manager and deploy the war by browsing the application in my desktop. After this I see "MyStartUp" in tomcat manager window in browser. My project name in eclipse looks as "mystartup". When I add the project in Eclipse IDE using "Add or remove" after right click the server, I see "mystartup" and I add it. Then if I refresh locahost:8080/manager/ I see two different project deployed. 1) MyStartUp 2) mystartup When I click the second one, I am not able to access the application. But if I use the first one, it works Because of this, each time, I do "mvn clean install" in IDE and I manually undeploy "MyStartUp" and deploy new install of "MyStartUp". This takes away my time. I want to add my project to Sever in IDE and restart it when I make a change and run the application. How to fix this issue?
-
Answer:
check your META-INF directory
Deepak Pandey at Quora Visit the source
Related Q & A:
- How do I bridge two different amps together?Best solution by ecoustics.com
- Why do i get this message when i...send sms: Phone number cannot receive SMS messages?Best solution by Yahoo! Answers
- Why do I get a message in German when I post on freecycle?Best solution by wiki.freecycle.org
- Why do I get an error message when I am trying to close Internet explorer page?Best solution by Yahoo! Answers
- Why do I get headaches when I work out?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.