0
我正在使用弹簧3.2和瓷砖3.0。在瓷砖中访问弹簧3豆3定义文件中的表达式
我想从一个弹簧bean属性设定的属性的值在图块定义这样
<put-attribute name="headTitle" expression="${msgs['serviceGroups.title']}" />
封邮件是HashMap中并且在弹簧的应用上下文定义
<bean id="msgs" class="qa.gov.moi.eservices.web.util.MessageSourceMapAdapter">
<constructor-arg name="messageSource">
<ref bean="messageSource"/>
</constructor-arg>
</bean>
这是弹簧瓷砖配置
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/tiles-defs.xml</value>
</list>
</property>
</bean>
这个模板的Default.jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><tiles:getAsString name="headTitle"/></title>
</head>
<body>
<div id="wrapper">
<div id="container">
<div id="top_header">
<tiles:insertAttribute name="heading" />
<tiles:insertAttribute name="menuTab" />
<tiles:insertAttribute name="genralizationTab" />
</div><!-- top_header -->
<tiles:insertAttribute name="content" />
<tiles:insertAttribute name="footer" />
</div><!-- container -->
</div><!-- wrapper -->
</body>
当我试图运行我得到了以下异常
Uncaught exception created in one of the service methods of the servlet /WEB-INF/jsp/layouts/default.jsp in application eservices. Exception created : java.lang.NullPointerException
除了这个问题每一件事情是确定的应用。
有什么办法可以让瓷砖表达式可以使用spring bean吗?