- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在构建一个 GWT 项目,使用 GWT-2.0.3 和 eclipse 插件。
好吧,首先我尝试了 JSTL1.2 和 servlet 2.5,
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:forEach var="app" items="${requestScope.apps}">
<tr><td width=20%><c:out value="${app.mapping}"></c:out></td>
<td width=40%><c:out value="${app.description}"></c:out></td>
...
HTTP ERROR: 500
javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
RequestURI=/system/view/register.html
Caused by:
java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
at javax.servlet.jsp.jstl.core.LoopTagSupport.unExposeVariables(LoopTagSupport.java:587)
at javax.servlet.jsp.jstl.core.LoopTagSupport.doFinally(LoopTagSupport.java:323)
at org.apache.jsp.system.view_jsp._jspx_meth_c_forEach_0(view_jsp.java:267)
at org.apache.jsp.system.view_jsp._jspx_meth_a_body_0(view_jsp.java:186)
at org.apache.jsp.system.view_jsp._jspService(view_jsp.java:98)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at org.app4j.test.DispatchServlet.doGet(DispatchServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Powered by Jetty://
最佳答案
我建议只切换到外部 Java 服务器(例如 Tomcat,您似乎已经安装了它并且可以与您的配置配合使用) - 问题少得多,比尝试使用 GWT 附带的残缺 Jetty 更容易。
说明可以在 docs 中找到。 .如果您坚持使用 GWT 的 Jetty,那么您将来只会遇到更多问题。
更新,请参阅下面 Pascal Thivent 的评论:
@Pascal:抱歉,我不是想说“切换到外部服务器,不说话”,只是我在 SO 和 GWT's Google Group 上看到了很多人。在配置 GWT 附带的 Jetty 时遇到问题 - 在某些情况下,这是因为配置与标准有些不同,因为 GWT 团队包含了旧的/修改过的(我无法获得有关此的任何可靠信息)版本的 Jetty,例如见 this post和那里的评论,一些引用:
NOTE: I believe the version of jetty shipped with GWT is below 6.1.12 and therefore you must leave off the first parameter in the example docs as it was added in jetty 6.1.12rc3. See the note at the top of the Jetty documents page.
Supposedly Jetty supports the servlet 2.5 specification and resource injection via the web.xml entry or @resource annotation. However, I have yet to figure out if this is supported by the Jetty version shipped with GWT. If anyone has figured out whether or not this works and if so how it is done please let me know.
关于gwt - 如何在 GWT 项目中使用 JSTL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2364129/
我想要一个“常量”的 JSTL 文件并在其他文件中引用它们。 例如 常量.jsp: Audi 其他文件: I drive an ${car} which is ${colour} 上面的代码(
你能帮我把这个 JSTL 标签转换成 JSTL 三元吗 class="author" class="${page.class}" > 最佳答案 非常简单: 关于jSTL -
我需要根据请求中存在的值将单选按钮设置为选中状态。下面是我在 JSP 中使用的代码 checked"> Active checked">
我有这个,它正在工作: Hello, world! 我想把它改成这样:
这个问题已经有答案了: Evaluate empty or null JSTL c tags (8 个回答) 已关闭 6 年前。 例如 ${post.title} 最佳答案 使用空关键字
我是 Java EE 技术的初学者。我想知道 jSTL-api jar 和 jSTL-impl jar 之间有什么区别。 为什么API和实现是分开的?这是否意味着还有其他可用的实现? 最佳答案 API
我正在尝试在 jetty 中运行一个在 Tomcat 5.5 中运行良好的应用程序。该应用程序使用 servlet 2.4 和 JSP 2.0。 Jetty/Jasper 抛出这个异常: org.ap
所以这是我用来发送包含值 ${masession.idemp} 的参数“idemp”的代码 "> " alt="consulter tickets
这个问题在这里已经有了答案: How to install JSTL? The absolute uri: http://java.sun.com/jstl/core cannot be resol
我正在学习 Spring-MVC 教程,目前我在 part 2 上.本教程要求我下载 jSTL.jar 和 standard.jar,它们曾经是 Jakarta Taglibs 项目的一部分。该项目已
我正在尝试以这种特定格式格式化数字: “1 234.56” 所以,两个小数,用点分隔。并使用空格字符(可选单引号)将数千个分组。输入值永远不会大于 9999.99。 我尝试为此使用模式,甚至尝试使用语
我正在使用 fmt:formatNumber 在 JSTL 中格式化货币,它会以 ($100) 格式显示负货币,如何让它以负数格式显示负货币而不是 ($100)? 非常感谢, 起诉 最佳答案 如果您使
我不知道我做错了什么,但我不能包括 JSTL。我有 jSTL-1.2.jar,但不幸的是我得到了异常: org.apache.jasper.JasperException: The absolute
我只需要这样的东西: ..... function myFunc(param) { if(param == true) { return "aaa"
当我使用 JSTL c:forEach 标签时,我的项目出现以下错误。我正在使用 apache Tomcat v7.0。 我在 WEB-INF\lib 文件夹中添加了以下 jar。 taglibs-s
以下代码导致错误: 错误提示 "error a line 4: unknown symbol 'test'". 如何将 test 从 JSTL 代码传递到 JSP scriptlet? 最
我正在使用 JSF 2.0 (mojarra) + primefaces 开发 Web 应用程序。过去我成功地使用了jSTL库的[c:set]标签来存储一些临时数据或从其他标签中输出。 在我目前的情况
我的实际目标是得到 工作。我目前正在使用 jetty-runner 7.4.2 运行我的 Web 应用程序。作为一个随机的尝试,我下载了一个更新的版本。这样,当我尝试启动我的 Web 应用程序时,我
为了尝试使用 jSTL,我用 maven 安装了 jSTL 1.2 库。但是,当我通过此消息运行 jsp 页面时,“绝对 uri: [ http://java.sun.com/jsp/jstl/cor
当我混合 JSTL 1.0 和 JSTL 1.1 taglib 声明时,它会在我的一些服务器上导致 ParseException,但不是全部。 这是给我带来麻烦的代码块: |STRINGOFTEX
我是一名优秀的程序员,十分优秀!