Hello, i have a problem with the guestbook application example.

I followed the instructions of official tutorial to test user
authentication. It worked fine on my machine locally, but when I
published it, appeared an error message:

--------------------------
Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this
error message and the query that caused it.
--------------------------

When I created the application chose: google apps authentication

This is the source code:

//GuestbookServlet.java
package guestbook;

import java.io.IOException;
@SuppressWarnings("serial")
public class GuestbookServlet extends HttpServlet {
        public void doGet(HttpServletRequest req, HttpServletResponse resp)
                        throws IOException {
                UserService userService = UserServiceFactory.getUserService();
        User user = userService.getCurrentUser();

        if (user != null) {
            resp.setContentType("text/plain");
            resp.getWriter().println("Hello, " + user.getNickname());
        } else {
 
resp.sendRedirect(userService.createLoginURL(req.getRequestURI()));
        }
        }
}

-------------------
appengine-web.xml
--------------
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0";>
        <application>arequipacontest</application>
        <version>1</version>

        <!-- Configure java.util.logging -->
        <system-properties>
                <property name="java.util.logging.config.file" value="WEB-INF/
logging.properties"/>
        </system-properties>

</appengine-web-app>

greetings

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to