1.在Struts标签结束时少了结束符,或者缺少'/>'
如:
<s:property value="currPage" > 缺少'/'的错误
<s:property value="curr_name"/ > 正确结束
错误信息:
tag s:property must be empty, but is not
tag s:property must be empty, but is not
2.
<frameset>
</frameset>
必须在 head 和body之间,要不然会什么都不显示
3.pageContext.request.contextPath一开始是“/“
There is no Action mapped for namespace [/] and action name [department_findAll] associated with context path [].
则是命名空间错误。
4. Struts2中<s: />标签的用法
5.遇到如下的错误
Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker
请在service层上面加上一个@Transactional
如果出现了以下的错误,说明你的Hibernate 版本不对应,我就是因为sessionFactory 用的Hibernate4 在
transaction 配置中 引入的Hibernate5
java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@c0d89c] bound to thread [http-nio-8080-exec-9]