diff --git a/core/src/main/java/hudson/WebAppMain.java b/core/src/main/java/hudson/WebAppMain.java index f9862f8121..a98ebf9f96 100644 --- a/core/src/main/java/hudson/WebAppMain.java +++ b/core/src/main/java/hudson/WebAppMain.java @@ -75,7 +75,7 @@ public class WebAppMain implements ServletContextListener { try { ServletResponse.class.getMethod("setCharacterEncoding",String.class); } catch (NoSuchMethodException e) { - context.setAttribute(APP,new IncompatibleServletVersionDetected()); + context.setAttribute(APP,new IncompatibleServletVersionDetected(ServletResponse.class)); return; } diff --git a/core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java b/core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java index bfe9adf38c..539712e359 100644 --- a/core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java +++ b/core/src/main/java/hudson/util/IncompatibleServletVersionDetected.java @@ -1,5 +1,10 @@ package hudson.util; +import hudson.remoting.Which; + +import java.io.File; +import java.io.IOException; + /** * Model object used to display the error top page if * we find out that the container doesn't support servlet 2.4. @@ -10,4 +15,13 @@ package hudson.util; * @author Kohsuke Kawaguchi */ public class IncompatibleServletVersionDetected { + private final Class servletClass; + + public IncompatibleServletVersionDetected(Class servletClass) { + this.servletClass = servletClass; + } + + public File getWhereServletIsLoaded() throws IOException { + return Which.jarFile(servletClass); + } } diff --git a/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly b/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly index 7995ed8f97..4227cb640f 100644 --- a/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly +++ b/core/src/main/resources/hudson/util/IncompatibleServletVersionDetected/index.jelly @@ -5,9 +5,9 @@

[!]Error

- We detected that your servlet container does not support Servlet 2.4. + We detected that your servlet container does not support Servlet 2.4 + (servlet API is loaded from ${it.whereServletIsLoaded})

-
\ No newline at end of file