小编use*_*296的帖子

我无法使用spring 3和apache tiles 2.2显示动态页面标题

我使用弹簧3和瓷砖2.2.2有问题.我无法显示动态页面标题.这些是我的config/jsp文件:

layout.jsp

<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <title><tiles:getAsString name="title" ignore="true"/></title>
    </head>

    <body>
        <tiles:insertAttribute name="header" />
        <div id="content-outer">
            <div id="content-wrapper" class="container_16">
                <tiles:insertAttribute name="body" />
                <tiles:insertAttribute name="menu" />
            </div>
        </div>
        <tiles:insertAttribute name="footer" />
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

Spring配置文件:

<bean id="tilesviewResolver"
    class="org.springframework.web.servlet.view.tiles2.TilesViewResolver">
    <property name="order" value="0" />
    <property name="requestContextAttribute" value="requestContext" />
    <property name="viewClass"
        value="org.springframework.web.servlet.view.tiles2.TilesView" />
</bean>
<bean id="tilesConfigurer"
    class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    <property name="definitions">
        <list>
            <value>/WEB-INF/tiles.xml</value>
        </list>
    </property>
    <property name="tilesProperties">
        <props>
            <prop …
Run Code Online (Sandbox Code Playgroud)

tiles spring-mvc

6
推荐指数
1
解决办法
4211
查看次数

标签 统计

spring-mvc ×1

tiles ×1