如何将 Struts2-jQuery 插件与 sitemesh 结合使用
当我尝试包含标签 (http://code. google.com/p/struts2-jquery/wiki/HeadTag) 在 sitemesh 装饰器
main.jsp (decorator)
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My Project- <decorator:title /></title>
<sj:head compressed="false" jqueryui="true"></sj:head>
</head>
<body>
<!-- head -->
....
Tomcat 错误
exception
java.lang.RuntimeException: org.apache.jasper.JasperException: An exception occurred processing JSP page /decorators/main.jsp at line 11
8: <head>
9: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
10: <title>My Project- <decorator:title /></title>
11: <sj:head compressed="false" jqueryui="true"></sj:head>
12: </head>
13: <body>
14: <!-- head -->
Stacktrace:
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:39)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)
请问有什么想法吗?
提前致谢
I have this error when I try to include the tag (http://code.google.com/p/struts2-jquery/wiki/HeadTag) in a sitemesh decorator
main.jsp (decorator)
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>My Project- <decorator:title /></title>
<sj:head compressed="false" jqueryui="true"></sj:head>
</head>
<body>
<!-- head -->
....
Tomcat Error
exception
java.lang.RuntimeException: org.apache.jasper.JasperException: An exception occurred processing JSP page /decorators/main.jsp at line 11
8: <head>
9: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
10: <title>My Project- <decorator:title /></title>
11: <sj:head compressed="false" jqueryui="true"></sj:head>
12: </head>
13: <body>
14: <!-- head -->
Stacktrace:
com.opensymphony.sitemesh.webapp.decorator.BaseWebAppDecorator.render(BaseWebAppDecorator.java:39)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:84)
Please any idea ?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
答案在这里:
web.xml
现在,它工作正常(strut2、sitemesh 和 jquery)。
问候
here the answer:
web.xml
Now, its working fine (strut2, sitemesh and jquery).
Regards
我只是发现我必须将此过滤器添加到我的 web.xml
无论如何谢谢
I just figure out that I must add this filter to my web.xml
Thanks any way