Java. lang. SecurityException: Filter of class org. apache. catalina. ssi. SSIFilter is privileged and cannot be loaded by this web application, privileged
Error:
1 java. lang. securityException: Filter of class org. apache. catalina. ssi. SSIFilter is privileged and cannot be loaded by this web application 2 at org. apache. catalina. core. applicationFilterConfig. getFilter (ApplicationFilterConfig. java: 271) 3 at org. apache. catalina. core. applicationFilterConfig. setFilterDef (ApplicationFilterConfig. java: 422) 4 at org. apache. catalina. core. applicationFilterConfig. <init> (ApplicationFilterConfig. java: 115) 5 at org. apache. catalina. core. standardContext. filterStart (StandardContext. java: 4072) 6 at org. apache. catalina. core. standardContext. start (StandardContext. java: 4726) 7 at org. apache. catalina. core. containerBase. addChildInternal (ContainerBase. java: 799) 8 at org. apache. catalina. core. containerBase. addChild (ContainerBase. java: 779) 9 at org. apache. catalina. core. standardHost. addChild (StandardHost. java: 601) 10 at org. apache. catalina. startup. hostConfig. deployDirectory (HostConfig. java: 1079) 11 at org. apache. catalina. startup. hostConfig. deployDirectories (HostConfig. java: 1002) 12 at org. apache. catalina. startup. hostConfig. deployApps (HostConfig. java: 506) 13 at org. apache. catalina. startup. hostConfig. start (HostConfig. java: 1317) 14 at org. apache. catalina. startup. hostConfig. lifecycleEvent (HostConfig. java: 324) 15 at org. apache. catalina. util. lifecycleSupport. fireLifecycleEvent (LifecycleSupport. java: 142) 16 at org. apache. catalina. core. containerBase. start (ContainerBase. java: 1065) 17 at org. apache. catalina. core. standardHost. start (StandardHost. java: 840) 18 at org. apache. catalina. core. containerBase. start (ContainerBase. java: 1057) 19 at org. apache. catalina. core. standardEngine. start (StandardEngine. java: 463) 20 at org. apache. catalina. core. standardService. start (StandardService. java: 525) 21 at org. apache. catalina. core. standardServer. start (StandardServer. java: 754) 22 at org. apache. catalina. startup. catalina. start (Catalina. java: 595) 23 at sun. reflect. nativeMethodAccessorImpl. invoke0 (Native Method) 24 at sun. reflect. nativeMethodAccessorImpl. invoke (Unknown Source) 25 at sun. reflect. delegatingMethodAccessorImpl. invoke (Unknown Source) 26 at java. lang. reflect. method. invoke (Unknown Source) 27 at org. apache. catalina. startup. bootstrap. start (Bootstrap. java: 289) 28 at org. apache. catalina. startup. bootstrap. main (Bootstrap. java: 414)View Code
Error cause:
Because the comments in ssi filter and ssi serverlet in tomcat --> conf --> web. xml are opened.
Solution:
Find the file. Comment out the following:
1 <! -- 2 <servlet> 3 <servlet-name> ssi </servlet-name> 4 <servlet-class> 5 org. apache. catalina. ssi. SSIServlet 6 </servlet-class> 7 <init-param> 8 <param-name> buffered </param-name> 9 <param-value> 1 </param-value> 10 </init-param> 11 <init-param> 12 <param-name> debug </param-name> 13 <param-value> 0 </param-value> 14 </init-param> 15 <init-param> 16 <param-name> expires </param-name> 17 <param-value> 666 </param-value> 18 </init-param> 19 <init-param> 20 <param-name> isVirtualWebappRelative </param-name> 21 <param-value> 0 </param-value> 22 </ init-param> 23 <init-param> 24 <param-name> inputEncoding </param-name> 25 <param-value> UTF-8 </param-value> 26 </init -param> 27 <init-param> 28 <param-name> outputEncoding </param-name> 29 <param-value> UTF-8 </param-value> 30 </init- param> 31 <load-on-startup> 4 </load-on-startup> 32 </servlet> 33 -->View Code1 <! -- 2 <servlet-mapping> 3 <servlet-name> ssi </servlet-name> 4 <url-pattern> *. shtml </url-pattern> 5 </servlet-mapping> 6 7 -->View Code1 <! -- 2 <filter-mapping> 3 <filter-name> ssi </filter-name> 4 <url-pattern> *. shtml </url-pattern> 5 </filter-mapping> 6 -->View Code 1 <! -- 2 <filter> 3 <filter-name> ssi </filter-name> 4 <filter-class> 5 org. apache. catalina. ssi. SSIFilter 6 </filter-class> 7 <init-param> 8 <param-name> contentType </param-name> 9 <param-value> text/x-server-parsed -html (;. *)? </Param-value> 10 </init-param> 11 <init-param> 12 <param-name> debug </param-name> 13 <param-value> 0 </param-value> 14 </init-param> 15 <init-param> 16 <param-name> expires </param-name> 17 <param-value> 666 </ param-value> 18 </init-param> 19 <init-param> 20 <param-name> isVirtualWebappRelative </param-name> 21 <param-value> 0 </param -value> 22 </init-param> 23 </filter> 24 -->View Code
Note: tomcat5 and tomcat6 support ssi differently. The solutions are different. The above method only solves my problem. There are also many solutions on the Internet.