struts2 标签库 /struts-dojo-tags not found&Expression parameters.parseContent is undefined
来源:互联网 发布:瑞士军刀男 知乎 编辑:程序博客网 时间:2024/05/20 11:46
struts2 标签库 /struts-dojo-tags not found&Expression parameters.parseContent is undefined
问题一:/struts-dojo-tags" not found
问题二:Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl.
myeclipse新建web project,添加struts2特性之后,会有如下图的类库出现:
其中并没有包含struts2-dojo-plugin类库。搜索struts2-dojo-plugin-2.1.2.jar并下载,添加到项目类库文件中,
然后再在/Struts2***Test/WebRoot/WEB-INF/lib下添加类库:
最后在jsp中,加入
<%@ taglib uri="/struts-dojo-tags" prefix="sx" %>可以成功解决问题一错误。
插曲:测试过程中有个时间段,项目中的任何一个jsp文件都无法通过URL访问,检查所有的文件、类库、配置和tomcat
都没有问题。新建一个jsp页,同样也是无法打开。最后通过Project/clean的方法之后,成功解决。还没找到原因。
下面两步会出现问题二所示的错误。
1.加入ajax theme
<s:head theme="ajax"/>2.使用典型的struts2标签dateTimePicker
<sx:datetimepicker name="date" label="please choose date"></sx:datetimepicker>错误分析:
参考地址:http://blog.csdn.net/zhangyulin54321/article/details/9109139
原因:struts2.0到struts2.1有一个重要的改变就是对ajax支持的改变,struts2.0的ajax支持主要以DWR和dojo为主,并专门提供ajax主题,如:<s:head theme="ajax"/>,但是在struts2.1不在提供ajax主题,而将原来的ajax主题放入了dojo插件中,我们需要将dojo标签引入到jsp页面。
解决方法:<head></head>标签中对theme的引用方式必须改变,如下:
<s:head theme="xhtml"/><sx:head parseContent="true"/>之后就能够正确的使用struts2的表单UI标签了。
截图如下:
- struts2 标签库 /struts-dojo-tags not found&Expression parameters.parseContent is undefined
- Expression parameters.parseContent is undefined on line 45
- freemarker.core.InvalidReferenceException: Expression parameters.parseContent is undefined on line 45, column 28 in template/aja
- freemarker.core.InvalidReferenceException: Expression parameters.parseContent is undefined on line 45, column 28 in template/aja
- Expression parameters.parseContent is undefined on line 45, column 28 in template/ajax/head.ftl. - C
- 有关struts2日历控件的小问题,struts-dojo-tags not found
- struts2标签使用时产生异常:freemarker.core.InvalidReferenceException: Expression parameters.id is undefined
- struts2 jsp File "/struts-tags" not found
- 【Struts 2.x】解决:Expression parameters.pushId is undefined...
- struts-dojo-tags datetimepicker标签
- tomcat部署 struts2 File "/struts-tags" not found
- File "/struts-tags" not found
- struts2的struts-tags标签
- Struts2标签问题-The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. S
- struts2 标签使用异常 The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filte
- struts2标签库struts-tags.tld的使用
- struts2标签定义文件 struts-tags-tld
- struts-dojo-tags datetimepicker标签无法正常显示问题 解决方案
- INNER JOIN——内部链接
- TypeError: elem.nodeName is undefined
- 专题四1005
- matlab之prod() rem() true() flipdim()函数\shading
- 关于AIDL一些需要注意的地方
- struts2 标签库 /struts-dojo-tags not found&Expression parameters.parseContent is undefined
- 大数据下的多维TopK算法
- iOS-UIStackView浅析
- 如何创建线程
- Exynos4412 中断处理流程详解
- 练习四 1006
- matlab颜色映射colormap() pcolor()
- Exynos4412 中断驱动开发相关问题总结
- AngularJS使用路由切换视图