【发布时间】:2015-04-28 11:42:39
【问题描述】:
因为我的 Spring MVC Web 应用正在使用
Servlet 版本:3.0 JSP版本:2.1 Java版本:1.7.0_11
并且已经在 OpenShift Tomcat 7 (JBossEWS 2.0) 上使用上述版本部署了战争,它总是给我错误:
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>
【问题讨论】:
-
也许您的 JSP 文件中有错误?如果你把它贴在这里,我们可以看看。
-
@nfechner JSP 代码包含错误
-
嗯,JSP 没有明显的问题。请包含完整的堆栈跟踪。
-
@nfechner Link 这是完整的堆栈跟踪
标签: java jsp servlets tomcat7 openshift