嵌入式码头错误绝对uri:http://java.sun.com/jsp/jstl/core无法解析 [英] Embedded Jetty Error The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

查看:669
本文介绍了嵌入式码头错误绝对uri:http://java.sun.com/jsp/jstl/core无法解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Embedded Jetty服务器运行测试,并使用Maven进行构建. 以下是用于在测试之前启动Jetty的代码.

I'm using Embedded Jetty server to run my tests and Maven for build. Following is the code used to start Jetty before tests.

System.out.println("Initializing Jetty Server...");
jettyServer = new Server(0);

WebAppContext webapp = new WebAppContext("src/main/webapp", "/testApp");
jettyServer.addHandler(webapp);

jettyServer.start();
int actualPort = jettyServer.getConnectors()[0].getLocalPort();
String baseUrl = "http://localhost:" + actualPort + "/testApp";

如果我使用作为Junit测试运行" 运行它,则所有测试均通过.没问题.

All the tests passes if I run it with 'Run as Junit Test'. No problems here.

但是,如果我以 Maven Test Maven Install 的身份运行测试,则失败的原因如下

But if I run it as Maven Test or Maven Install The tests fails withe following cause

Caused by: com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 /WEB-INF/pages/test1.jsp(3,62) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

我在POM.xml中添加了JSTL依赖关系.请帮助解决此问题.

I have the JSTL dependancy added in POM.xml. Please help to resolve this..

推荐答案

在以下回购中: https://github.com/ericminio/learning-jetty

您可以找到:

  1. 将包含c:forEach标记的Jetty服务jsp降级的JstlTest
  2. pom需要删除有关解决 http://java.sun.com/的错误消息jsp/jstl/core

希望有帮助

这篇关于嵌入式码头错误绝对uri:http://java.sun.com/jsp/jstl/core无法解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆