I am a beginner with developing for Google App Engine, so I am trying to follow the basic Java tutorial. Currently I have followed all the steps up to step 3 of Building and testing the app for the "Guestbook" application.
I perform mvn appengine:devserver
in a terminal, but when I go to localhost:8080
in my browser, I see the following message.
HTTP ERROR: 503
Problem accessing /. Reason:
SERVICE_UNAVAILABLE
In the terminal where I started the server I don't see any output due to this error. Can anyone provide any insight into this problem?
Edit - localhost:8080/guestbook
also produces this same HTTP 503 error
Here is my web.xml file (copied from the GAE tutorial page):
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app PUBLIC
"-//Oracle Corporation//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5">
<servlet>
<servlet-name>guestbook</servlet-name>
<servlet-class>com.google.appengine.demos.guestbook.GuestbookServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>guestbook</servlet-name>
<url-pattern>/guestbook</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>guestbook.jsp</welcome-file>
</welcome-file-list>
</web-app>
And here is the guestbook.jsp they provided (in case this helps):
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="java.util.List" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/>
</head>
<body>
<%
String guestbookName = request.getParameter("guestbookName");
if (guestbookName == null) {
guestbookName = "default";
}
pageContext.setAttribute("guestbookName", guestbookName);
UserService userService = UserServiceFactory.getUserService();
User user = userService.getCurrentUser();
if (user != null) {
pageContext.setAttribute("user", user);
%>
<p>Hello, ${fn:escapeXml(user.nickname)}! (You can
<a href="<%= userService.createLogoutURL(request.getRequestURI()) %>">sign out</a>.)</p>
<%
} else {
%>
<p>Hello!
<a href="<%= userService.createLoginURL(request.getRequestURI()) %>">Sign in</a>
to include your name with greetings you post.</p>
<%
}
%>
<form action="/guestbook.jsp" method="get">
<div><input type="text" name="guestbookName" value="${fn:escapeXml(guestbookName)}"/></div>
<div><input type="submit" value="Switch Guestbook"/></div>
</form>
</body>
</html>