Struts2的环境中FCKEditor上传文件,提示安全错误,权限不足...

    该错误是由于struts2对request进行了封装,当fck的request.getinputStream时就会出错!

    是拦截器的缘故url-pattern改为*.action就可以解决,但是因为struts2的tag需要经过过滤器,所以如果你jsp页面上面用到了struts2的tag,那么就要增加一个*.jsp的url-pattern。即:修改web.xml中struts2的配置:

 

<filter>   
    <filter-name>struts2</filter-name>   
    <filter-class>
        org.apache.struts2.dispatcher.FilterDispatcher   
    </filter-class>   
</filter>   

<filter-mapping>   
    <filter-name>struts2</filter-name>   
    <url-pattern>*.action</url-pattern>   
</filter-mapping>   

<filter-mapping>   
    <filter-name>struts2</filter-name>   
    <url-pattern>*.jsp</url-pattern>   
</filter-mapping> 

 

你可能感兴趣的:(apache,jsp,Web,xml,fckeditor)