reference: http://blog.csdn.net/qjyong/archive/2008/11/16/3311688.aspx
能解决这个问题还真是要感谢 http://blog.csdn.net/qjyong/archive/2008/11/16/3311688.aspx这篇文章的作者qjyong。参照他的方法我在SSH中完成了不同方法验证需求不同的操作。
1. 自定义的FileChecks类。这里对qjyong的FileChecks稍微做了一下改动。应该使用SSH框架以后,使用的Action都写成org.springframework.web.struts.DelegatingActionProxy。所以在这种情况下Class.forName(className).newInstance() instanceof DispatchAction永远都为false.下面只把改动的代码注释出来,其它的都参考qjyong的。
Tags: Validator
09-01
16
Tomcat 6, java.lang.SecurityException: Servlet of class org.apache.catalina.servlets
作者:Java伴侣 日期:2009-01-16
Tomcat 6, java.lang.SecurityException: Servlet of class org.apache.catalina.servlets.InvokerServlet is privileged and cannot b
<Context reloadable="true" privileged="true">
The invoker servlet lets you run servlets without first making changes to your Web application's deployment descriptor (i.e., the WEB-INF/web.xml file). Instead, you just drop your servlet into WEB-INF/classes and use the URL http://host/servlet/ServletName (or http://host/webAppName/servlet/ServletName once you start using your own Web applications. The invoker servlet is extremely convenient when you are learning and even when you are testing things doing your initial development. You almost certainly want to enable it when learning, but you should disable it again before deploying any real applications.
To enable the invoker servlet, uncomment the following servlet and servlet-mapping elements in install_dir/conf/web.xml. Do not confuse this Apache Tomcat-specific web.xml file with the standard one that goes in the WEB-INF directory of each Web application.
<servlet>
<Context reloadable="true" privileged="true">
The invoker servlet lets you run servlets without first making changes to your Web application's deployment descriptor (i.e., the WEB-INF/web.xml file). Instead, you just drop your servlet into WEB-INF/classes and use the URL http://host/servlet/ServletName (or http://host/webAppName/servlet/ServletName once you start using your own Web applications. The invoker servlet is extremely convenient when you are learning and even when you are testing things doing your initial development. You almost certainly want to enable it when learning, but you should disable it again before deploying any real applications.
To enable the invoker servlet, uncomment the following servlet and servlet-mapping elements in install_dir/conf/web.xml. Do not confuse this Apache Tomcat-specific web.xml file with the standard one that goes in the WEB-INF directory of each Web application.
<servlet>
Tags: Tomcat 6
09-01
16
ssi.SSIFilter is privileged and cannot be loaded by this web application
作者:Java伴侣 日期:2009-01-16
Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application
tomcat版本5.X
1、将tomcat 的server\lib目录下servlets-ssi.renametojar文件重命名为servlets-ssi.jar。
2、修改tomcat的 conf目录下web.xml文件,找到如下代码:
/*
<servlet>
tomcat版本5.X
1、将tomcat 的server\lib目录下servlets-ssi.renametojar文件重命名为servlets-ssi.jar。
2、修改tomcat的 conf目录下web.xml文件,找到如下代码:
/*
<servlet>
Tags: TOMCAT