There's a more or less related article in the March 2004 issue of the JavaRanch Journal by Kyle Brown. Although in Kyle's article the long-running process is an SQL query, your problem seems to be pretty identical. In short, start the FOP process in the background and direct the user's browser to a self-refreshing page which polls every two to three seconds whether the FOP process has finished generating the PDF file somewhere. If it has, display the PDF file. If it hasn't, display the self-refreshing page again.