Dear Vinny.. may i ask something again?? I'm really new with gae.. I have just deployed this "http://testictactoe.appspot.com/". When i click to the "Tictactoe", it shows "Server Error".
My plan is i wanna this "http://testictactoe.appspot.com/" as an server, i will make an c# as my client application. Here is my java coding for server : package com.tictactoe; import java.io.*; import java.nio.channels.Channel; import java.util.Random; import javax.servlet.http.*; import com.google.appengine.api.channel.ChannelMessage; import com.google.appengine.api.channel.ChannelService; import com.google.appengine.api.channel.ChannelServiceFactory; import com.google.appengine.api.users.UserService; import com.google.appengine.api.users.UserServiceFactory; import com.sun.org.apache.xml.internal.resolver.helpers.Debug; @SuppressWarnings("serial") public class TictactoeServlet extends HttpServlet { private UserService userService; private String userID; private ChannelService channelService; private String token; private String gameState; public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { /*resp.setContentType("text/plain"); resp.getWriter().println("Hello, world");*/ userService = UserServiceFactory.getUserService(); userID = userService.getCurrentUser().getUserId(); channelService = ChannelServiceFactory.getChannelService(); token = channelService.createChannel(userID); channelService.sendMessage(new ChannelMessage(userID, token)); resp.setContentType("text/html"); resp.getWriter().write(token); } @Override public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException { String userId = req.getParameter("user"); gameState = req.getParameter("gstate"); if(gameState == "X-E") gameState = "O"; else if(gameState == "O-E") gameState = "X"; else if(gameState == "O-S" || gameState == "X-S") gameState = "O"; channelService = ChannelServiceFactory.getChannelService(); channelService.sendMessage(new ChannelMessage(userId, gameState)); } } Is there anything wrong?? At my client application, what's the url that could link to this tictactoe server. Thanks.. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-appengine. For more options, visit https://groups.google.com/groups/opt_out.
