<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" >
Create the log4j profile in the Web-inf directory:Log4j.properties
# for Jboss:avoid to setup log4j outside $JBOSS _home/server/default/deploy/log4j.xml!
# for all other servers:comment out of the log4j listener in Web.xml to activate log4j.
Log4j.rootlogger=debug, stdout
log4j.appender.stdout=org.apache.log4j.consoleappender
Log4j.appender.stdout.layout=org.apache.log4j.patternlayout
log4j.appender.stdout.layout.conversionpattern=%d%p [%c]-%m%n
X. Add files to the Web-inf folder Applicationcontext.xml<?xml version= "1.0" encoding= "UTF-8"?> <beans xmlns= "Http://www.springframework.org/schema/beans" xmlns : xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP" x mlns:tx= "Http://www.springframework.org/schema/tx" xmlns:context= "Http://www.springframework.org/schema/context "Xsi:schemalocation=" Http://www.springframework.org/schema/beans Http://www.springframework.org/sche Ma/beans/spring-beans-2.5.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework. Org/schema/aop/spring-aop-2.5.xsd Http://www.springframework.org/schema/tx Http://www.springframewo Rk.org/schema/tx/spring-tx-2.5.xsd Http://www.springframework.org/schema/context HTTP://WWW.SPRINGF Ramework.org/schema/context/spring-context-2.5.xsd "> <!--the parent application context Definit Ion for the Springapp APPLIcation--> <!--<bean class= "
Org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor "/>--> </beans>
Xi. Modification of index.jsp documents<%
request.getrequestdispatcher ("/web-inf/jsp/login.jsp"). Forward (request,response);
%>
12, release, start the projectEnter in Browser: http://localhost:8080/webmvct/