Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I use use JSP 2.1 with Cargo maven plugin and Jetty6x embedded?
    text
    copied!<p>I have a webapp that is using JSP 2.1, Servlets 2.5 and JSTL 1.2 on Java 6. I do my testing using the maven-jetty-plugin 6.1.1rc1 without any problems. From this link: <a href="http://docs.codehaus.org/display/JETTY/JSP+2.0+v+JSP+2.1" rel="nofollow noreferrer">http://docs.codehaus.org/display/JETTY/JSP+2.0+v+JSP+2.1</a>, I understand that jetty 6 will select JSP 2.1 if on JDK 5+, which is working fine. </p> <p>Here is the relevant section from my pom.xml of the application war:</p> <pre><code>&lt;!--servlet &amp; javax--&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;jstl&lt;/artifactId&gt; &lt;version&gt;1.2&lt;/version&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet&lt;/groupId&gt; &lt;artifactId&gt;servlet-api&lt;/artifactId&gt; &lt;version&gt;2.5&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt; &lt;artifactId&gt;jsp-api&lt;/artifactId&gt; &lt;version&gt;2.1&lt;/version&gt; &lt;scope&gt;provided&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>Now I'd like to set up automated integration tests using cargo and jetty6x embedded. The container starts up fine without errors. However, I can't render any JSPs. This is the exception I get, which as far as I can tell is because a JSP-2.0 impl is being used instead of JSP-2.1. </p> <pre><code>(TagLibraryInfoImpl.java:547) - Unknown element (deferred-value) in attribute </code></pre> <p>and <code>Caused by: java.lang.NoSuchMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext; at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:140)</code></p> <p>Here is my cargo config:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt; &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt; &lt;version&gt;1.0.1&lt;/version&gt; &lt;configuration&gt; &lt;container&gt; &lt;containerId&gt;jetty6x&lt;/containerId&gt; &lt;type&gt;embedded&lt;/type&gt; &lt;/container&gt; &lt;configuration&gt; &lt;deployables&gt; &lt;deployable&gt; &lt;groupId&gt;groupId&lt;/groupId&gt; &lt;artifactId&gt;artifact&lt;/artifactId&gt; &lt;type&gt;war&lt;/type&gt; &lt;/deployable&gt; &lt;/deployables&gt; &lt;/configuration&gt; &lt;wait&gt;${cargo.wait}&lt;/wait&gt; &lt;/configuration&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;start-container&lt;/id&gt; &lt;phase&gt;pre-integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;start&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;stop-container&lt;/id&gt; &lt;phase&gt;post-integration-test&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;stop&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; </code></pre> <p></p> <p>The cargo jetty6x container also uses v6.1.1rc1 of jetty, so it must be something to do with the way cargo is using jetty. I know that cargo hard-codes the versions of its container dependencies instead of using the maven dependency mechanism (probably for good reason, jira ->CARGO-571) </p> <p>So my question is: has anybody else managed to use JSP 2.1 with cargo and jetty 6x embedded? Any suggestions for getting it working?</p> <p>Any help much appreciated!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload