转自 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不能使用了
后来发现生成的页面中有如下代码
<link rel="stylesheet" href="/workStation/struts/xhtml/styles.css" type="text/css"/>
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
baseRelativePath: "/workStation/struts/dojo",
isDebug: false,
bindEncoding: "gb2312",
debugAtAllCosts: true // not needed, but allows the Venkman debugger to work with the includes
};
</script>
<script language="JavaScript" type="text/javascript"
src="/workStation/struts/dojo/dojo.js"></script>
<script language="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 />它会自动加上上面的代码)