我在hibernate 里面订单表(user)关联了 person表
查询显示的时候
${user.person.name}
报这个表达式有问题
可我能取到user类中的属性值,不能取到person类中的属性值,
?
?
表中有字段
?
我经过精心的排错,和百度的查询终于解决了
?
?<filter>
??????? <filter-name>openSessionInViewFilter</filter-name>
??????? <filter-class>
??????????? org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
??????? </filter-class>
??? </filter>
???
??? <filter-mapping>
??????? <filter-name>openSessionInViewFilter</filter-name>
??????? <url-pattern>/*</url-pattern>
??? </filter-mapping>
这段代码加在 web.xml 中不过他是有顺序的
?
配置过滤器的时候,过滤器是有顺序的,openSessionInViewFilter配置在struts的后边的时候,根本就没有起作用,正确的配置顺序是:
1.监听器
2.编码过滤器
3.openSessionInViewFilter过滤器