步骤:
1.把~~\examples\todo\view文件夹中文件放到WebContent文件夹下
2.把~~\examples\todo\resources\WEB-INF下的components.xml放到工程中的WEB-INF下
3.把~~\examples\todo\resources下的.gpd.todo.jpdl.xml,hibernate.cfg.xml,jbpm.cfg.xml,todo.jpdl.xml,seam.properties文件拷到工程的WebContent下
4.把~~\examples\todo\src\org\jboss\seam\example\todo下的Login.java,TodoList.java拷到"工程名-ejb"的包中,修改包名
5.修改login.jsp,todo.jsp使其符合xhtml的规范,方法见问题(1)
遇到的一些问题:
(1)The markup in the document preceding the root element must be well-formed.
原因是todo.jsp和login.jsp两个jsp文件不符合xhtml规则,命名空间不要在使用@包含,
<%@taglib uri="" prefix="f" %>
<%@taglib uri="" prefix="h" %>
<%@taglib uri="" prefix="s" %>
换成Xhtml格式:
xmlns:h=""
xmlns:f=""
xmlns:s=""
lang="en">
Index
.......//此处省略
(2)@In attribute requires non-null value:user.Actor
查了网上一些资料,说是要在@In private Actor actor;的@In标记改成@In(create=true)
不过实际上我的问题是一些配置文件没有
解决方法是检查你的WebContent文件夹下有没有todo.jpdl.xml,components.xml有没有配置
todo.jpdl.xml
jbpm.cfg.xml,hibernate.cfg.xml几个配置文件
(3)XML document structures must start and end within the same entity.
原因是todo.jsp在修改的时候标签重复了
待解决:
(1)最后实现了之后访问页面想要修改任务的日期,每次都说我输入的不对,不知应该用什么样的格式输入?
阅读(905) | 评论(0) | 转发(0) |