Я попытался найти по сайту проблему, но не повезло.Переадресация цикла на моем веб-приложении в Google App Engine
Я создал веб-приложение JSP и развернуто в Google App Engine. Он не использует аутентификацию учетной записи Google, а Parse.com - как хранилище данных на заднем конце. «login.jsp» является его приветственным файлом. Когда я попал в URL на GAE, как "HTTP: {имя-проекта} // .appspot.com" на Firefox, это шоу:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
Я пошел в Firebug и обнаружили, что "GET login.jsp" был более 20 раз автоматически.
В то время как я пытался сделать это с Chrome, он вернулся в другую, но подобное сообщение:
This webpage has a redirect loop
The webpage at http://{project-name}.appspot.com/login.jsp has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Learn more about this problem.
Error code: ERR_TOO_MANY_REDIRECTS
Любая идея?
EDIT --- код login.jsp как ниже
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<title>Log in</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.css" />
<style>
.alert-info {
font-weight: bold;
margin-bottom: 4px;
padding: 8px 14px;
}
.full-layout { padding:2%; }
</style>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script>
<script type="text/javascript">
$.mobile.ajaxEnabled = false;
</script>
</head>
<body>
<div class="full-layout">
<h1>Log in</h1>
<% String alertMsg = (String) request.getSession().getAttribute("loginResultMsg");
if (alertMsg != null) {
%>
<%= alertMsg %>
<% } %>
<form action="LoginServlet" method="post">
Name:<input type="text" name="name"><br>
Password:<input type="password" name="password"><br>
<input type="submit" value="Log in">
</form>
<% request.getSession().setAttribute("loginResultMsg", null); %>
</div>
<%@include file="footer.jsp" %>
</body>
</html>
Сетевая консоль Firebug заноситься:
GET login.jsp
и статус был "302 Found". «Ответ» был «Перезагрузите страницу, чтобы получить источник для: http: // {PROJECT_ID} .appspot.com/login.jsp»
Странно, что веб-приложение хорошо работает в локальной среде разработки, но не работает во время развертывания на GEA.
Можете ли вы разместить свой login.jsp? В основном login.jsp отправляет перенаправление на себя. Это может быть из-за кода в вашем login.jsp или какого-либо другого фильтра или сервлета в вашем приложении. – nhylated
Вы видите ответ, который вы получаете от начального 'GET login.jsp', чтобы увидеть точный URL-адрес, на который он перенаправляется? Это может помочь вам отладить ваш код. – tx802
Я бы дал большой палец на @nhylated. благодаря – alextc