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

  • Home
  • SEARCH
  • 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 7802037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:08:13+00:00 2026-06-02T01:08:13+00:00

I am using Google Web Toolkit and Java Google App Engine to write an

  • 0

I am using Google Web Toolkit and Java Google App Engine to write an app. I have found a situation where the following happens very predictably. I have a servlet the app.yaml entry for which looks like this:

handlers:

- url: /foo/*
  name: FooServlet
  servlet: com.waga.server.FooServlet
  login: required

This servlet checks that the user is logged in (redundant, I know), looks for the user in the database, and if found includes a Bar.jsp file to render an HTML page that includes javascript to load a GWT module. This Bar.jsp file and GWT module have been working for a while, with only a few minor recent changes to allow the servlet to check things before rending the Bar.jsp and with some code added to the top of the Bar.jsp file to compute a few strings to include into the page.

I put a log.info at the top of the servlet, at the top of the Bar.jsp file, and at the bottom of the Bar.jsp file. When I use GWT devmode to go to the servlet, I see the log messsages in the following order:

Foo servlet top
Bar.jsp top
Bar.jsp bottom
Foo servlet top
Foo servlet top
Bar.jsp top
Bar.jsp bottom
Bar.jsp top
Bar.jsp bottom

That is, the servlet seems to be being visited by the browser 3 times, and not synchronously (note that the last two overlap). This is happens every time I run it.

Further, the Bar.jsp file says it is rendering the page, but the GWT javascript never loads and renders the client-side app. It has in the past, so that should work; that is, the GWT client-side code was working and I have just been rearranging how the urls map to servlet and how the servlets include the .jsp files. Further, when devmode is compiling the Java to JavaScript on the server before sending it to the client, my laptop fan comes on and I can see Java using most of my CPU for quite a few seconds in order to do this; I do not see that now.

I tried getting rid of the Servlet and just having the app.yaml call the .jsp directly (everything that the Servlet checks I happen to know passes, such as me already being logged in, so it does nothing.) That is, I tried making the app.yaml say this:

handlers:

- url: /foo/*
  jsp: Bar.jsp
  login: required

Now the log says this

Bar.jsp top
Bar.jsp botton
Bar.jsp top
Bar.jsp top
Bar.jsp bottom
Bar.jsp bottom

Same interleaving and same symptoms that the GWT module never seems to be loaded.

  • 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-02T01:08:15+00:00Added an answer on June 2, 2026 at 1:08 am

    This situation becomes more obvious when I print out the request.getPathInfo() at the top of the Bar.jsp file. The problem was that I trusted GWT webAppCreator to generate reasonable code when I started the project and I did not think about my URL paths carefully. In particular, webAppCreator generates HTML that refers to the compiled javascript client from the web page as follows:

    <!--                                           -->
    <!-- This script loads your compiled module.   -->
    <!-- If you add any GWT meta tags, they must   -->
    <!-- be added before this line.                -->
    <!--                                           -->
    <script type="text/javascript" language="javascript" src="waga/waga.nocache.js"></script>
    

    Note the relative path in the src URL, instead of an absolute path. In my opinion generating an absolute path makes a lot more sense as they don’t accidentally move the target around in the filesystem if you, say, map a URL with a prefix to this .jsp file, which is exactly what I did; in particular the path to the generated javascript client makes no sense as a relative path as the compiler is always going to put it into a specific place in the filesystem. Making the path (as well as another relative path to a .css file I had also used) absolute by prepending a slash fixed the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a simple web app/form using google app engine. the site is
I'm using the Google App Engine in combination with the Google Web Toolkit to
I've created Google App Engine project in Java using Eclipse following the book Beginning
I'm considering building a web app using Java and Google Web Toolkit and I
I am currently working on a simple web application through Google App engine using
I have a layout in Google Web Toolkit using UIBinder involving a TabLayoutPanel .
I'm using the Google Web Toolkit (GWT) 2.1. I have a GWT Grid (which
I have a xml web service which I would like to track using Google
I am considering solutions for drawing diagrams using Google Web Toolkit (GWT). Up until
I'm trying to create a user interface using Google Web Toolkit v2.4. For a

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.