File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
opengrok-web/src/main/java/org/opengrok/web Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,19 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
89
89
}
90
90
}
91
91
92
+ String serverInfo = context .getServerInfo ();
93
+ LOGGER .log (Level .INFO , "running inside {0}" , serverInfo );
94
+ if (serverInfo .startsWith ("Apache Tomcat" )) {
95
+ int idx ;
96
+ if ((idx = serverInfo .indexOf ('/' )) > 0 ) {
97
+ String version = serverInfo .substring (idx + 1 );
98
+ if (!version .startsWith ("10.0" )) {
99
+ LOGGER .log (Level .SEVERE , "Unsupported Tomcat version: {0}" , version );
100
+ throw new Error ("Unsupported Tomcat version" );
101
+ }
102
+ }
103
+ }
104
+
92
105
/*
93
106
* Create a new instance of authorization framework. If the code above
94
107
* (reading the configuration) failed then the plugin directory is
You can’t perform that action at this time.
0 commit comments