I have tried to search around the site for my problem but with no luck.
I have created a JSP web app and deployed on Google App Engine. It does not use Google Account authentication but Parse.com as back end data storage. "login.jsp" is its welcome file. When I hit the URL on GAE like "http://{project-name}.appspot.com" on Firefox, it show:
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.
I went to Firebug and found that "GET login.jsp" was called more than 20 times automatically.
While I tried it with Chrome, it returned a different but similar message:
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
Any idea?
EDIT --- code for the login.jsp is as below
<%@ 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's Network console logged:
GET login.jsp
and the status was "302 Found". "Response" was "Reload the page to get source for: http://{PROJECT_ID}.appspot.com/login.jsp"
The weird thing is the web app works well on local development environment but fails while deployed on GEA.
GET login.jspto see the exact url it's redirecting to? That might help you debug your code. - tx802