0

请理解我的英语不好。

我负责维护一个带有 Spring 和 MVC 和 VIEW 的磁贴的网站。

Tiles 没有向我显示正确的输出,并且控制台上没有打印 java 错误消息。而不是正确输出图块,而是显示纯 xml 文件......

这是我在网络浏览器上打印的来源和输出。

web.xml

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
        /WEB-INF/spring-root-applicationContext.xml
        /WEB-INF/spring-security-applicationContext.xml
    </param-value>
</context-param>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <servlet-class>DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring-child-applicationContext.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>/*</url-pattern>
</servlet-mapping>

控制器.java

@RequestMapping(value = "/home/login", method = RequestMethod.GET)
public String login(Map modelMap, HttpServletRequest request) {
    return "/home/member/login.htiles";
}

瓷砖-layouts.xml

<definition name="layouts_home_tiles" template="/WEB-INF/views/layouts/layouts_home_tiles.jsp">
    <put-attribute name="header"    value="/WEB-INF/views/layouts/home_header.jsp" />
    <put-attribute name="content"   value="" />
    <put-attribute name="footer"    value="/WEB-INF/views/layouts/home_footer.jsp" />
</definition>

<definition name="*.htiles" extends="layouts_home_tiles">
    <put-attribute name="content"   value="/WEB-INF/views/{1}.jsp" />
</definition>
<definition name="*/*.htiles" extends="layouts_home_tiles">
    <put-attribute name="content"   value="/WEB-INF/views/{1}/{2}.jsp" />
</definition>
<definition name="*/*/*.htiles" extends="layouts_home_tiles">
    <put-attribute name="content"   value="/WEB-INF/views/{1}/{2}/{3}.jsp" />
</definition>
<definition name="*/*/*/*.htiles" extends="layouts_home_tiles">
    <put-attribute name="content"   value="/WEB-INF/views/{1}/{2}/{3}/{4}.jsp" />
</definition>

layouts_sub_tiles.jsp

<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="t"%>

<t:insertAttribute name="header"/>
<t:insertAttribute name="content"/>
<t:insertAttribute name="footer"/>

网页浏览器输出

<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="t"%>

<t:insertAttribute name="header"/>
<t:insertAttribute name="content"/>
<t:insertAttribute name="footer"/>
4

3 回答 3

1

TilesViewResolver除了用于 jsp 的解析器(通常InternalResourceViewResolver)之外,您需要在您的上下文中定义。

这是一个适合我的配置片段:

    <bean id="tilesViewResolver"
            class="org.springframework.web.servlet.view.tiles2.TilesViewResolver">
            <property name="order" value="0" /> <!-- you need to tell spring to use this resolver first, hence order=0 -->
    </bean>

    <bean id="tilesConfigurer"
            class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
            <property name="definitions" value="PATH_TO_YOUR_TILES_XML_CONFIG" />
    </bean>


    <bean id="viewResolver"
            class="org.springframework.web.servlet.view.InternalResourceViewResolver">
            <property name="order" value="1" /><!-- this resolver will be used if the view can't be resolved by tiles resolver  hence order=1-->

            <property name="prefix" value="/WEB-INF/jsp/" />
            <property name="suffix" value=".jsp" />
    </bean>

希望有帮助。

于 2012-04-30T09:19:14.847 回答
0

@soulcheck 这是 DEBUG LEVEL Log 的输出,我不太明白。谢谢你的关心

 INFO annotation.ClassPathScanningCandidateComponentProvider[registerDefaultFilters(186)] : JSR-330 'javax.inject.Named' annotation found and supported for component scanning
DEBUG support.PathMatchingResourcePatternResolver[doFindMatchingFileSystemResources(552)] : Looking for matching resources in directory tree [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\admin] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor_demo] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\mobile] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\admin] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\home] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\monitor] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\monitor_demo] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\note] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\sqlmap\project] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[doRetrieveMatchingFiles(614)] : Searching directory [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\project] for files matching pattern [D:/dev/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/cyoz/WEB-INF/classes/com/byto/**/*.class]
DEBUG support.PathMatchingResourcePatternResolver[_findPathMatchingResources(353)] : Resolved location pattern [classpath*:com/byto/**/*.class] to resources [file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\admin\AdminController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\admin\AdminService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\admin\AdminServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\BytoSendmail.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\Constant.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\encodeCookie.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\PageNavigation.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\StringUtil.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\config\Unescape.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\LoginCheck.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\LoginFailure.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\LoginSuccess.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\LoginUser.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\LogoutCheck.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\RememberMe.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\login\RememberMeAuth.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\MainController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\MainService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\home\MainServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\HomeController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\HomeService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\HomeServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor\MonitorController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor\MonitorService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor\MonitorServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor_demo\MonitorDemoController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor_demo\MonitorDemoService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\monitor_demo\MonitorDemoServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\ErrorMessage.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\GetXMLData.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\JsonController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\JsonService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\JsonServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\json\Sync.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\mobile\NoteController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\mobile\NoteService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\openapi\note\mobile\NoteServiceImpl.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\project\ProjectController.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\project\ProjectService.class], file [D:\dev\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\cyoz\WEB-INF\classes\com\byto\project\ProjectServiceImpl.class]]
DEBUG support.DefaultListableBeanFactory[doGetBean(242)] : Returning cached instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
DEBUG web.FilterChainProxy[getFilters(195)] : Converted URL to lowercase, from: '/home/'; to: '/home/'
DEBUG web.FilterChainProxy[getFilters(202)] : Candidate is: '/home/'; pattern is /**; matched=true
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 1 of 11 in additional filter chain; firing Filter: 'SecurityContextPersistenceFilter'
DEBUG context.HttpSessionSecurityContextRepository[readSecurityContextFromSession(130)] : No HttpSession currently exists
DEBUG context.HttpSessionSecurityContextRepository[loadContext(88)] : No SecurityContext was available from the HttpSession: null. A new one will be created.
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 2 of 11 in additional filter chain; firing Filter: 'LogoutFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 3 of 11 in additional filter chain; firing Filter: 'UsernamePasswordAuthenticationFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 4 of 11 in additional filter chain; firing Filter: 'BasicAuthenticationFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 5 of 11 in additional filter chain; firing Filter: 'RequestCacheAwareFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 6 of 11 in additional filter chain; firing Filter: 'SecurityContextHolderAwareRequestFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 7 of 11 in additional filter chain; firing Filter: 'RememberMeAuthenticationFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 8 of 11 in additional filter chain; firing Filter: 'AnonymousAuthenticationFilter'
DEBUG authentication.AnonymousAuthenticationFilter[doFilter(67)] : Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@9055c2bc: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@b364: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 9 of 11 in additional filter chain; firing Filter: 'SessionManagementFilter'
DEBUG session.SessionManagementFilter[doFilter(87)] : Requested session IDE5DEEABF96803AAC5BA0A76B61C2769F is invalid.
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 10 of 11 in additional filter chain; firing Filter: 'ExceptionTranslationFilter'
DEBUG web.FilterChainProxy[doFilter(375)] : /home/ at position 11 of 11 in additional filter chain; firing Filter: 'FilterSecurityInterceptor'
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[lookupAttributes(173)] : Converted URL to lowercase, from: '/home/'; to: '/home/'
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /admin/**; matched=false
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /home/board/**; matched=false
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /project/**; matched=false
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /monitor/; matched=false
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /monitor/reg_app; matched=false
DEBUG expression.ExpressionBasedFilterInvocationSecurityMetadataSource[extractMatchingAttributes(200)] : Candidate is: '/home/'; pattern is /monitor/reg_app_check; matched=false
DEBUG intercept.FilterSecurityInterceptor[beforeInvocation(182)] : Public object - authentication not attempted
DEBUG web.FilterChainProxy[doFilter(362)] : /home/ reached end of additional filter chain; proceeding with original chain
DEBUG servlet.DispatcherServlet[doService(693)] : DispatcherServlet with name 'dispatcher' processing GET request for [/home/]
DEBUG annotation.DefaultAnnotationHandlerMapping[getHandlerInternal(221)] : Mapping [/home/] to HandlerExecutionChain with handler [com.byto.openapi.home.MainController@1c869e8f] and 2 interceptors
DEBUG servlet.DispatcherServlet[doDispatch(769)] : Last-Modified value for [/home/] is: -1
DEBUG support.HandlerMethodInvoker[invokeHandlerMethod(173)] : Invoking request handler method: public java.lang.String com.byto.openapi.home.MainController.main(java.util.Map,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
DEBUG ibatis.SqlMapClientTemplate[execute(168)] : Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@5629626a] for iBATIS operation
DEBUG sql.Connection[debug(27)] : {conn-100006} Connection
DEBUG ibatis.SqlMapClientTemplate[execute(185)] : Obtained JDBC Connection [Transaction-aware proxy for target Connection  from DataSource [org.apache.commons.dbcp.BasicDataSource@1e0c386d]] for iBATIS operation
DEBUG sql.Connection[debug(27)] : {conn-100006} Preparing Statement:   SELECT wr_id,wr_subject,wr_content,  DATE_FORMAT(wr_idate, '%Y.%m.%d') AS wr_idate,  wr_del_flag,wr_hit,wr_category,wr_notice,wr_file1,wr_file2,wr_file1_count,wr_file2_count  FROM byto_board_notice WHERE wr_del_flag=0  ORDER BY wr_id DESC LIMIT 7   
DEBUG datasource.DataSourceUtils[doGetConnection(110)] : Fetching JDBC Connection from DataSource
DEBUG sql.PreparedStatement[debug(27)] : {pstm-100007} Executing Statement:   SELECT wr_id,wr_subject,wr_content,  DATE_FORMAT(wr_idate, '%Y.%m.%d') AS wr_idate,  wr_del_flag,wr_hit,wr_category,wr_notice,wr_file1,wr_file2,wr_file1_count,wr_file2_count  FROM byto_board_notice WHERE wr_del_flag=0  ORDER BY wr_id DESC LIMIT 7   
DEBUG sql.PreparedStatement[debug(27)] : {pstm-100007} Parameters: []
DEBUG sql.PreparedStatement[debug(27)] : {pstm-100007} Types: []
DEBUG sql.ResultSet[debug(27)] : {rset-100008} ResultSet
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Header: [wr_id, wr_subject, wr_content, wr_idate, wr_del_flag, wr_hit, wr_category, wr_notice, wr_file1, wr_file2, wr_file1_count, wr_file2_count]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [9, 공지입니다, 공지입니다, 2011.11.07, 0, 18, 일반공지, 0, , , 0, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [8, 공지입니다, 공지입니다, 2011.11.07, 0, 3, 일반공지, 0, , , 0, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [7, 공지입니다 공지입니다 공지입니다 공지입니다, 공지입니다 , 2011.11.07, 0, 5, 일반공지, 0, , , 0, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [6, 공지입니다 공지입니다, 공지입니다공지입니다공지입니다공지입니다공지입니다 , 2011.11.07, 0, 7, 일반공지, 0, , , 0, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [5, 공지입니다, 공지입니다, 2011.11.07, 0, 3, 일반공지, 0, , , 0, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [4, 공지입니다, 공지입니다, 2011.11.03, 0, 5, 일반공지, 0, login_201111031845341.gif, , 4, 0]
DEBUG sql.ResultSet[debug(27)] : {rset-100008} Result: [3, 공지사항 입니다, 공지사항 입니다, 2011.11.03, 0, 6, 일반공지, 0, , , 0, 0]
DEBUG datasource.DataSourceUtils[doReleaseConnection(332)] : Returning JDBC Connection to DataSource
DEBUG servlet.DispatcherServlet[render(1045)] : Rendering view [org.springframework.web.servlet.view.tiles2.TilesView: name 'home/index.htiles'; URL [home/index.htiles]] in DispatcherServlet with name 'dispatcher'
DEBUG tiles2.TilesView[exposeModelAsRequestAttributes(328)] : Added model object 'mainNoticeList' of type [java.util.ArrayList] to request in view with name 'home/index.htiles'
DEBUG impl.BasicTilesContainer[render(615)] : Render request recieved for definition 'home/index.htiles'
DEBUG servlet.DispatcherServlet[doService(693)] : DispatcherServlet with name 'dispatcher' processing GET request for [/WEB-INF/views/layouts/layouts_home_tiles.jsp]
DEBUG handler.SimpleUrlHandlerMapping[lookupHandler(266)] : Matching patterns for request [/WEB-INF/views/layouts/layouts_home_tiles.jsp] are [/**]
DEBUG handler.SimpleUrlHandlerMapping[lookupHandler(290)] : URI Template variables for request [/WEB-INF/views/layouts/layouts_home_tiles.jsp] are {}
DEBUG handler.SimpleUrlHandlerMapping[getHandlerInternal(221)] : Mapping [/WEB-INF/views/layouts/layouts_home_tiles.jsp] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@3789346e] and 2 interceptors
DEBUG servlet.DispatcherServlet[doDispatch(769)] : Last-Modified value for [/WEB-INF/views/layouts/layouts_home_tiles.jsp] is: -1
DEBUG servlet.DispatcherServlet[doDispatch(824)] : Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
DEBUG servlet.DispatcherServlet[processRequest(674)] : Successfully completed request
DEBUG servlet.DispatcherServlet[processRequest(674)] : Successfully completed request
DEBUG access.ExceptionTranslationFilter[doFilter(100)] : Chain processed normally
DEBUG context.HttpSessionSecurityContextRepository[saveContext(338)] : SecurityContext is empty or anonymous - context will not be stored in HttpSession. 
DEBUG context.SecurityContextPersistenceFilter[doFilter(89)] : SecurityContextHolder now cleared, as request processing completed
DEBUG servlet.DispatcherServlet[doService(693)] : DispatcherServlet with name 'dispatcher' processing GET request for [/favicon.ico]
DEBUG handler.SimpleUrlHandlerMapping[lookupHandler(266)] : Matching patterns for request [/favicon.ico] are [/**]
DEBUG handler.SimpleUrlHandlerMapping[lookupHandler(290)] : URI Template variables for request [/favicon.ico] are {}
DEBUG handler.SimpleUrlHandlerMapping[getHandlerInternal(221)] : Mapping [/favicon.ico] to HandlerExecutionChain with handler [org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler@3789346e] and 2 interceptors
DEBUG servlet.DispatcherServlet[doDispatch(769)] : Last-Modified value for [/favicon.ico] is: -1
DEBUG servlet.DispatcherServlet[doDispatch(824)] : Null ModelAndView returned to DispatcherServlet with name 'dispatcher': assuming HandlerAdapter completed request handling
DEBUG servlet.DispatcherServlet[processRequest(674)] : Successfully completed request
于 2012-05-03T00:49:16.277 回答
0

我修改了 web.xml

/* 到 /

这解决了。

于 2012-05-03T09:01:20.500 回答