java - How to run Spring 3.2 project in Tomcat V6.0.45 -


i need develop spring project. requirements follows:

  • spring - 3.0
  • hibernate - 3.0
  • mysql 5.5
  • tomcat 6.0
  • jdk 1.7

i not using web.xml instead using java configuration.when trying run project on tomcat v6.0 (by right click in eclipse on project -> run @ server) saying project can not run on server. have no idea how run project. pom.xml follows :

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>lab.testme</groupid> <artifactid>test</artifactid> <version>0.0.1-snapshot</version> <packaging>war</packaging> <name>testme3.0</name> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> <dependency>     <groupid>org.springframework</groupid>     <artifactid>spring-webmvc</artifactid>     <version>3.2.13.release</version> </dependency> <dependency>     <groupid>javax.servlet</groupid>     <artifactid>jstl</artifactid>     <version>1.2</version> </dependency> <dependency>     <groupid>javax.servlet</groupid>     <artifactid>javax.servlet-api</artifactid>     <version>3.1.0</version>     <scope>provided</scope> </dependency> <dependency>     <groupid>org.apache.tiles</groupid>     <artifactid>tiles-extras</artifactid>     <version>3.0.3</version> </dependency> <dependency>     <groupid>org.slf4j</groupid>     <artifactid>slf4j-api</artifactid>     <version>1.7.5</version> </dependency> <dependency>     <groupid>mysql</groupid>     <artifactid>mysql-connector-java</artifactid>     <version>5.1.32</version>     <scope>runtime</scope> </dependency> <dependency>     <groupid>org.codehaus.jackson</groupid>     <artifactid>jackson-mapper-asl</artifactid>     <version>1.5.3</version> </dependency> <dependency>     <groupid>org.codehaus.jackson</groupid>     <artifactid>jackson-core-asl</artifactid>     <version>1.5.3</version> </dependency> <dependency>     <groupid>com.fasterxml.jackson.core</groupid>     <artifactid>jackson-databind</artifactid>     <version>2.5.1</version> </dependency> <dependency>     <groupid>org.springframework.security</groupid>     <artifactid>spring-security-web</artifactid>     <version>3.0.8.release</version> </dependency> <dependency>     <groupid>org.springframework.security</groupid>     <artifactid>spring-security-config</artifactid>     <version>3.0.8.release</version> </dependency> <dependency>     <groupid>org.springframework</groupid>     <artifactid>spring-jdbc</artifactid>     <version>3.0.5.release</version> </dependency> <dependency>     <groupid>org.springframework</groupid>     <artifactid>spring-orm</artifactid>     <version>3.0.5.release</version> </dependency> <dependency>     <groupid>com.fasterxml.jackson.core</groupid>     <artifactid>jackson-annotations</artifactid>     <version>2.5.1</version> </dependency> <dependency>     <groupid>org.hibernate</groupid>     <artifactid>hibernate-core</artifactid>     <version>3.6.10.final</version> </dependency> <dependency>     <groupid>org.javassist</groupid>     <artifactid>javassist</artifactid>     <version>3.18.2-ga</version> </dependency> <dependency>     <groupid>org.apache.tomcat</groupid>     <artifactid>tomcat-dbcp</artifactid>     <version>7.0.55</version> </dependency> <dependency>     <groupid>javax.validation</groupid>     <artifactid>validation-api</artifactid>     <version>1.1.0.final</version> </dependency> <dependency>     <groupid>org.hibernate</groupid>     <artifactid>hibernate-validator</artifactid>     <version>4.1.0.final</version> </dependency> <dependency>     <groupid>org.hibernate</groupid>     <artifactid>hibernate-entitymanager</artifactid>     <version>4.3.5.final</version> </dependency> <dependency>     <groupid>org.springframework</groupid>     <artifactid>spring-tx</artifactid>     <version>3.2.2.release</version> </dependency> </dependencies> <build> <plugins>     <plugin>         <groupid>org.apache.maven.plugins</groupid>         <artifactid>maven-war-plugin</artifactid>         <version>2.6</version>         <configuration>             <failonmissingwebxml>false</failonmissingwebxml>         </configuration>     </plugin> </plugins> </build> </project> 

my facets setting follow :-

<?xml version="1.0" encoding="utf-8"?> <faceted-project>   <fixed facet="wst.jsdt.web"/>   <installed facet="wst.jsdt.web" version="1.0"/>   <installed facet="java" version="1.7"/>   <installed facet="jst.web" version="3.1"/> </faceted-project> 

i searched articles , tried change jst.web 2.4 instead of 3.1 not working. if trying edit project facets through eclipse giving me error can not change version of project facet dynamic web module 2.5. kindly suggest me how run project?

java based configuration web (using servletcontainerinitializer in turn spring use webapplicationinitializer) servlet 3.0 feature. tomcat 6 supports servlet 2.5 specification , such not support java based configuration. in short when using tomcat 6 must use web.xml. see this information on servlet specification supported tomcat version.

to fix either upgrade tomcat 7 or use web.xml.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -