maple00 2011-04-16
转自http://hi.baidu.com/quandang/blog/item/6f735a17299daa13972b43be.html
大家都知道了struts2和fckEditor结合中为了上传图片
需要把
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
换掉
/*
但是在后来使用时发现标签datetimepicker不能使用了
后来发现生成的页面中有如下代码
<linkrel="stylesheet"href="/workStation/struts/xhtml/styles.css"type="text/css"/>
<scriptlanguage="JavaScript"type="text/javascript">
//Dojoconfiguration
djConfig={
baseRelativePath:"/workStation/struts/dojo",
isDebug:false,
bindEncoding:"gb2312",
debugAtAllCosts:true//notneeded,butallowstheVenkmandebuggertoworkwiththeincludes
};
</script>
<scriptlanguage="JavaScript"type="text/javascript"
src="/workStation/struts/dojo/dojo.js"></script>
<scriptlanguage="JavaScript"type="text/javascript"
src="/workStation/struts/simple/dojoRequire.js"></script>
所以就应加上
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
</filter-mapping>
要不然会找不到相应的js和css文件,大家遇到希望有帮助(结合时不要忘了在<head>中加入<s:head/>它会自动加上上面的代码)