Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:39:01+00:00 2026-06-02T19:39:01+00:00

First Post. I’m a mobile game developer looking into using the Java version of

  • 0

First Post.

I’m a mobile game developer looking into using the Java version of AppEngine for the backend of an Andriod game. Since the game is written in Java, I figured that I’d use the Java version of AppEngine. I’ve some experience with the Python version of AppEngine, and am finding some difficulty in my migration to the Java version of AppEngine, specifically in relation to URL mapping.

In Python, this is what I was used to:

def main():
application = webapp.WSGIApplication(
[('/', Main),
    ('/admin', Admin),
    ('/setScore', SetScore), 
    ('/getScores', SetScores),
    ('/getUser', GetUser),
    ('/getCatelog', GetCatelog)
])

webapp.util.run_wsgi_app(application)

The WSGI application would map different URLs to the different request handlers. My question is whether there is equivalent functionality in Java or if a similar approach is even considered best practices in the Java incarnation of AppEngine.

Does Java have an alternate way to achieve this functionality, or is there some alternate paradigm for how Java Servlets handle this sort of thing?

I am aware that the web.xml file gives you the opportunity to map urls to servelets, but I’m not sure if that’s the proper way.

What’s the standard way that one might map URLs in the Java version of AppEngine to have different functionality triggered by different URLs?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:39:03+00:00Added an answer on June 2, 2026 at 7:39 pm

    Mapping URLs to servlets in web.xml is pretty basic, but might get the job done for you. However, depending on your actual intention, it might be quite cumbersome.

    Are you writing a “traditional” web application or a REST service? Then, there are a myriad of frameworks you could choose from. For appengine I learned to use lightweight frameworks, such as Stripes, which I have made some good experience with.

    For REST, I recommend Jersey, but there are other options out there, too.

    So, in Stripes, for example, you use ActionBeans which are then mapped to URLs. Here is a simple example:

    @UrlBinding( "/main/score/{$event}" )
    public class ScoreActionBean extends AbstractActionBean {
        public Resolution getScores() {
            ...
        }
    
        public Resolution setScore() {
            ...
        }
    }
    

    Edit: since you are writing a game backend, you might be more interested in a REST service? There are some good tutorials out there, but to give you an impression, it’s quite similar to the example above:

    @Path("/hello")
    public class Hello {
    
        // This method is called if TEXT_PLAIN is request
        @GET
        @Produces(MediaType.TEXT_PLAIN)
        public String sayPlainTextHello() {
            return "Hello Jersey";
        }
    
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first post to stack overflow! I'm using SlimDX for a game
first post don't hurt me :) I am using a BorderLayout with the usual
First post here... I normally develop using PHP and Symfony with Propel and ActionScript
first post here=) I've been looking for this answer and haven't been able to
first post on the site! I'm looking for some help inserting tr elements mid-way
First post here, I have tried searching but couldn't find what I'm looking for
First Post! So I'm working on Windows Mobile application for a class I'm in.
first post, im using the cakephp framework with ajax to create a reply button.
This is my first post here, but I've using this site regularly to help
first post. Been an iPhone developer intern for about five weeks now. I've read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.