Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] problems using jetty-maven-plugin and Jetty 9.2.2 with jsp pages

Tomaz,

Here's a small test project with your index.jsp code in it and your dependencies. I can't reproduce the error. Can you modify this project until it does?

thanks
Jan


On 19 August 2014 04:23, Tomaž Juretič <tomaz.juretic@xxxxxxxxx> wrote:
Hi Jan,

mvn depedency:tree gives me the following output:

user1@linux1:~/Workspace/Peskovnik/Java/jsp/HelloWorld$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building HelloWorld Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ HelloWorld ---
[INFO] com.tmj.example.jsp:HelloWorld:war:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- org.eclipse.jetty.orbit:javax.servlet:jar:3.0.0.v201112011016:provided
[INFO] \- javax.el:el-api:jar:2.2:provided
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.725s
[INFO] Finished at: Mon Aug 18 20:17:30 CEST 2014
[INFO] Final Memory: 10M/134M
[INFO] ------------------------------------------------------------------------
user1@linux1:~/Workspace/Peskovnik/Java/jsp/HelloWorld$


This jsp works fine in jetty 9.2.2, when deployed inside a war file. I have problems only when using mvn jetty:run plugin. In this case I get the error.

Thanks,
Tomaz



On 18. 08. 2014 01:01, Jan Bartel wrote:
Tomaz,


That jsp works fine with the jetty test webapp using 9.2.2. I suspect you have some dependencies for a different (probably glassfish) jsp/el version. These could be transitive deps so do "mvn dependency:tree" to check.

cheers
Jan


On 17 August 2014 17:40, Tomaž Juretič <tomaz.juretic@xxxxxxxxx> wrote:
Hi Jan,

Here is content of my index.jsp file:

<%@ page import="java.io.*,java.util.*, javax.servlet.*" %>
<html>
<body>
<h2>Hello World!</h2>
<%
   Date date = new Date();
   out.print( "<h2 align=\"center\">" +date.toString()+"</h2>");
%>
</body>
</html>


Thanks,
Tomaz


On 17. 08. 2014 02:44, Jan Bartel wrote:
Tomaz,

Can you post your index.jsp file?
thanks
Jan


On 17 August 2014 02:03, Tomaž Juretič <tomaz.juretic@xxxxxxxxx> wrote:
Hi,

I am experiencing problems using jetty-maven-plugin and Jetty 9.2.2 with jsp pages.

My configuration is set like this:

<properties>
    <jettyVersion>9.2.2.v20140723</jettyVersion>
</properties>


<plugin>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>${jettyVersion}</version>
    <configuration>
        <scanIntervalSeconds>2</scanIntervalSeconds>
        <webApp>
            <contextPath>/test</contextPath>
        </webApp>
    </configuration>
</plugin>


Running my webapp through the "mvn jetty:run" starts jetty server, and I can access java servlet and static pages, but when I try to access any JSP page, I get following exception:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory



When I am deploying the WAR into stand-alone jetty (without the jetty-maven plugin) everything works well.
Also when I am using Jetty version 9.1 (<jettyVersion>9.1.5.v20140505</jettyVersion>) everything works well - even with the maven jetty plugin.

I read in the documentation, that with version 9.2 the default jsp engine was changed. Is this maybe the reason for this behavior? Does anyone know how to get around this issue?

Thanks.


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
'Expert Jetty/CometD developer,production,operations advice'

Attachment: ttt.tar
Description: Unix tar archive


Back to the top