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 133599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:27:42+00:00 2026-05-11T06:27:42+00:00

I have a GWT application that displays some charts rendered by JFreeChart. Every few

  • 0

I have a GWT application that displays some charts rendered by JFreeChart. Every few minutes, the page refreshes, which causes the app to generate new charts. (In other words, the entire chart generation process is bootstrapped by a client request.) The problem with this is that multiple clients hitting the same server would result in multiple requests to generate charts, but since the charts are the same for all users, there’s really no reason to do this. I would like to prerender the charts in a background thread, which would be kicked off when the application starts, and then just serve the already-rendered charts to the client on request.

I don’t see any ‘sanctioned’ way in GWT to execute your own code at server startup. The only way I can think of to accomplish this is to create a servlet that gets loaded at startup by the application container, and kick off the chart generation thread in the init() method.

Is there a more preferred way to do this?

Note: Assuming that it’s true, ‘no’ is a perfectly acceptable answer.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T06:27:43+00:00Added an answer on May 11, 2026 at 6:27 am

    To answer your question: No. GWT is a front end technology, and the only bit of GWT that crosses this line is the RPC mechanism. The only ‘GWT’ type way that you could do it would be to check if the chart files exist the first time a user requests them, and generate them if they don’t. This would mean using the file system as your check of if it’s been created yet or not.

    The better way would be to do what you said, eg: configure your your web project to kick off a class on startup. You do this in your web.xml as described here:

    http://wiki.metawerx.net/wiki/Web.xml.LoadOnStartup

    Here’s an example of how Stripes does it:

    <servlet>         <servlet-name>StripesDispatcher</servlet-name>         <servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>         <load-on-startup>1</load-on-startup>     </servlet>     <servlet-mapping>         <servlet-name>StripesDispatcher</servlet-name>         <url-pattern>*.action</url-pattern>     </servlet-mapping> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a GWT application which draws some resources from a separate servlet via
I have a GWT application for which I'm trying to write some tests using
I have some GWT application that run on the server. we are subscripting with
I have an AWT applet application that needs to be ported over to GWT.
I have Application written with GWT 1.7. I have one page where I upload
We have a GWT application that needs to display various holidays. Is there a
I have a simple java applet that is invoked from gwt application. Is there
I have this GWT application which login/logout to a server. The server side is
I have an application that utilized libraries which are published under different licences like
I have gwt web project, which must use application.properties (on client side) loaded as

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.