openshift tomcat 7.0 (JBossEWS 2.0) 支持什么版本的 servlet、java 和 jsp?
What version of servlet,java and jsp does openshift tomcat 7.0 (JBossEWS 2.0 ) support?
因为我的 Spring MVC 网络应用正在使用
Servlet version: 3.0
JSP version: 2.1
Java version: 1.7.0_11
并在 OpenShift Tomcat 7 (JBossEWS 2.0) 上部署了 war 使用以上版本,它总是给我错误:
org.apache.jasper.JasperException: Unable to compile class for JSP
java.util.NoSuchElementException
java.util.ArrayList$Itr.next(ArrayList.java:834)
我尝试使用版本 JSP 2.0 和 Servlet 2.5..仍然没有用。
有帮助吗?
Login.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login</title>
</head>
<body>
<section id="page">
<!-- HEADER -->
<header>
<!-- NAV-BAR -->
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div id="logo">
</div>
</div>
</div>
</div>
<!--/NAV-BAR -->
</header>
<!--/HEADER -->
<!-- LOGIN -->
<section id="login" class="visible">
<div class="container">
<div class="row">
<c:if test="${not empty error}">
<div class="errorblock" style="text-align:center;">
<b style="text-align:center;">Your login attempt was not successful, try again.</b>
</div>
</c:if>
<div class="col-md-4 col-md-offset-4">
<div class="login-box-plain divide-40">
<form:form method="post" action="authenticate" modelAttribute="userInfo">
<div class="form-group">
<label for="exampleInputEmail1">User Name</label>
<i class="fa fa-user"></i>
<form:input path="loginID" id="username" placeholder="" />
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<i class="fa fa-lock"></i>
<form:password class="form-control" path="password" id="password" placeholder=""/>
</div>
<div>
<button type="submit" class="btn btn-danger">Login</button>
</div>
</form:form>
</div>
</div>
</div>
</div>
</section>
<!--/LOGIN -->
</section>
您可以找到 tomcat 7 正在使用的库版本,方法是通过 sshing 进入您的应用程序并 运行 使用以下命令:
ls ~/jbossews/lib
这将输出以下内容:
ls ~/jbossews/lib/
annotations-api-7.0.54.jar
el-api-7.0.54.jar
servlet-api.jar
tomcat-i18n-ja-7.0.54.jar
annotations-api.jar
el-api.jar
tomcat7-websocket-7.0.54.jar
tomcat-i18n-ja.jar
catalina-7.0.54.jar
extras
tomcat7-websocket.jar
tomcat-jdbc-7.0.54.jar
catalina-ant-7.0.54.jar
jasper-7.0.54.jar
tomcat-api-7.0.54.jar
tomcat-jdbc.jar
catalina-ant.jar
jasper-el-7.0.54.jar
tomcat-api.jar
tomcat-util-7.0.54.jar
catalina.jar
jasper-el.jar
tomcat-coyote-7.0.54.jar
tomcat-util.jar
commons-collections-eap6.jar
jasper.jar
tomcat-coyote.jar
websocket-api-7.0.54.jar
commons-dbcp-eap6.jar
jasper-jdt.jar
tomcat-i18n-es-7.0.54.jar
websocket-api.jar
commons-loggin
g-adapters-eap6.jar
jsp-api-7.0.54.jar
tomcat-i18n-es.jar
commons-logging-api-eap6.jar
jsp-api.jar
tomcat-i18n-fr-7.0.54.jar
commons-pool-eap6.jar
servlet-api-7.0.54.jar
tomcat-i18n-fr.jar
因为我的 Spring MVC 网络应用正在使用
Servlet version: 3.0 JSP version: 2.1 Java version: 1.7.0_11
并在 OpenShift Tomcat 7 (JBossEWS 2.0) 上部署了 war 使用以上版本,它总是给我错误:
org.apache.jasper.JasperException: Unable to compile class for JSP
java.util.NoSuchElementException
java.util.ArrayList$Itr.next(ArrayList.java:834)
我尝试使用版本 JSP 2.0 和 Servlet 2.5..仍然没有用。 有帮助吗? Login.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login</title>
</head>
<body>
<section id="page">
<!-- HEADER -->
<header>
<!-- NAV-BAR -->
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-4">
<div id="logo">
</div>
</div>
</div>
</div>
<!--/NAV-BAR -->
</header>
<!--/HEADER -->
<!-- LOGIN -->
<section id="login" class="visible">
<div class="container">
<div class="row">
<c:if test="${not empty error}">
<div class="errorblock" style="text-align:center;">
<b style="text-align:center;">Your login attempt was not successful, try again.</b>
</div>
</c:if>
<div class="col-md-4 col-md-offset-4">
<div class="login-box-plain divide-40">
<form:form method="post" action="authenticate" modelAttribute="userInfo">
<div class="form-group">
<label for="exampleInputEmail1">User Name</label>
<i class="fa fa-user"></i>
<form:input path="loginID" id="username" placeholder="" />
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<i class="fa fa-lock"></i>
<form:password class="form-control" path="password" id="password" placeholder=""/>
</div>
<div>
<button type="submit" class="btn btn-danger">Login</button>
</div>
</form:form>
</div>
</div>
</div>
</div>
</section>
<!--/LOGIN -->
</section>
您可以找到 tomcat 7 正在使用的库版本,方法是通过 sshing 进入您的应用程序并 运行 使用以下命令:
ls ~/jbossews/lib
这将输出以下内容:
ls ~/jbossews/lib/
annotations-api-7.0.54.jar
el-api-7.0.54.jar
servlet-api.jar
tomcat-i18n-ja-7.0.54.jar
annotations-api.jar
el-api.jar
tomcat7-websocket-7.0.54.jar
tomcat-i18n-ja.jar
catalina-7.0.54.jar
extras
tomcat7-websocket.jar
tomcat-jdbc-7.0.54.jar
catalina-ant-7.0.54.jar
jasper-7.0.54.jar
tomcat-api-7.0.54.jar
tomcat-jdbc.jar
catalina-ant.jar
jasper-el-7.0.54.jar
tomcat-api.jar
tomcat-util-7.0.54.jar
catalina.jar
jasper-el.jar
tomcat-coyote-7.0.54.jar
tomcat-util.jar
commons-collections-eap6.jar
jasper.jar
tomcat-coyote.jar
websocket-api-7.0.54.jar
commons-dbcp-eap6.jar
jasper-jdt.jar
tomcat-i18n-es-7.0.54.jar
websocket-api.jar
commons-loggin
g-adapters-eap6.jar
jsp-api-7.0.54.jar
tomcat-i18n-es.jar
commons-logging-api-eap6.jar
jsp-api.jar
tomcat-i18n-fr-7.0.54.jar
commons-pool-eap6.jar
servlet-api-7.0.54.jar
tomcat-i18n-fr.jar