Open fvanderbiest opened 9 years ago
Same is true for GeoNetwork:
geonetwork_1 | INFO: validateJarFile(/var/lib/tomcat6/webapps/geonetwork/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
(I hardly remember having commented a similar issue in the previous weeks)
We need to add the scope "provided" to the underlying pom.xml for the dependency servlet-api
, as it is done for mapfishapp:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
The main reason behind is that the servlet-api should be provided by the application server (tomcat), the webapp needs to know the classes at compile time, but the servlet-api.jar should not end up into the generated war.
Thanks Pierre.
Do you think we can do this in GS + GN for 15.06 ?
For GN it requires a little bit of investigation: There is no actual reason why we need jetty here: https://github.com/georchestra/geonetwork/blob/georchestra-15.06/pom.xml#L337 (I mean in the specific use of georchestra, it might be used for multinode-mode geonetwork, or embedded / all-in-one installer ...)
For GS, it does not seem to be the case anymore (as of 2.3.2-geor)
According to http://stackoverflow.com/a/17745238 geoserver should not ship the servlet-api jar ...
In catalina.out: