model view controller - maven with spring mvc -


anybody have web project in maven spring? don't know why can't project working, therefore need see working project understand it. project simple login/logout in maven using spring mvc.

tanks

i http 404 when run project on server , don't know can wrong. maybe wrong som of xml-files:

web.xml

  <persistence xmlns="http://java.sun.com/xml/ns/persistence"          xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"          xsi:schemalocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns  /persistence/persistence_2_0.xsd"          version="2.0">     <persistence-unit name="bokingguard" transaction-type="resource_local">        <provider>org.hibernate.ejb.hibernatepersistence</provider>        <!-- entities -->        <properties>           <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.driver"/>           <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/book"/>           <property name="hibernate.connection.username" value=""/>           <property name="hibernate.connection.password" value="" />           <property name="hibernate.dialect" value="org.hibernate.dialect.mysqldialect"/>           <property name="hibernate.hbm2ddl.auto" value="update"/>           <property name="show_sql" value="true" />         </properties>           </persistence-unit> </persistence> 

spring-servlet.xml

<?xml version="1.0" encoding="windows-1252"?>    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemalocation="    http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd    http://www.springframework.org/schema/context    http://www.springframework.org/schema/context/spring-context-3.0.xsd    http://www.springframework.org/schema/mvc    http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd    http://www.springframework.org/schema/aop    http://www.springframework.org/schema/aop/spring-aop-3.0.xsd    http://www.springframework.org/schema/tx    http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">  <!-- use @component annotations bean definitions --> <context:component-scan base-package="se.guard.domain" /> <context:component-scan base-package="se.guard.repository" /> <context:component-scan base-package="se.guard.service" /> <context:component-scan base-package="se.guard.controller" />  <!-- use @controller annotations mvc controller definitions --> <mvc:annotation-driven />  <!-- add jpa support --> <bean id="emf"     class="org.springframework.orm.jpa.localcontainerentitymanagerfactorybean">     <property name="loadtimeweaver">         <bean class="org.springframework.instrument.classloading.instrumentationloadtimeweaver" />     </property> </bean> <!-- add transaction support --> <bean id="mytxmanager" class="org.springframework.orm.jpa.jpatransactionmanager">     <property name="entitymanagerfactory" ref="emf" /> </bean> <!-- use @transaction annotations managing transactions --> <tx:annotation-driven transaction-manager="mytxmanager" /> <!-- view resolver --> <bean     class="org.springframework.web.servlet.view.internalresourceviewresolver">     <property name="prefix" value="/web-inf/" />     <property name="suffix" value=".jsp" /> </bean> </beans> 

use spring petclinic or maven archetypes ge working application spring mvc


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -