Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a web application on GWT. I'm using MVP pattern with activities and places. I have a xml config file containing some parameters to be used by the application. Content of this xml file is sent to the client using HttpRequest; I'm using a singleton class to hold the information from the xml file.

Right now, the application is getting the data when the user starts the application in the home page, that is working well. Now, since I'm using activities and places, a user can bookmark a page and starts the application in any other page (Place). And here comes the problem: Since I'm using some of the information from the xml file to set some ui widgets, I have to check if the xml config file was read and the application already has the parameters (I do this by checking the singleton class). But the xml file is read by using an HttpRequest, so I got errors 'cause the application needs some parameters to initialize some ui widgets, but these parameters aren't ready on time.

I was thinking on using an synchronous request to fix the problem, but it seems complicated and not recommendable to do that. So, I'd like to hear some other suggestions.


share|improve this question
This is a programming related question. You are likely to get an answer on stackoverflow – Sripathi Krishnan Nov 14 '11 at 15:41
@SripathiKrishnan There is no specific code error in this question, so it's not suitable for Stack Overflow as written. – Adam Lear Nov 14 '11 at 16:12

Could you use a dynamic host page to seed the page with the configuration parameters? See the GWT wiki article:

Using a Dynamic Host Page for Authentication and Initialization

You might have to switch to using JavaScript to hold the initialization data in the page using this approach.

share|improve this answer

I don't know GWT, but I think that an asynchronous request is OK. Client looks for its prefs. If they are missing, it request them. As simple as that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.