views:

291

answers:

1
  1. I have a commandLink in a JSF page in a portal environment. On clicking it, I redirect to a servlet (by calling facesContext.getExternalcontext().sendRedirect(//Servlet URL//)).

  2. the servlet is created for downloading an excel file from the server.

  3. A Save As File dialog opens up with the JSF Portal page in the background.

This works fine, but when I have downloaded the file, I find that when I click on any action component on the portal JSF page, it just refreshes the page instead of performing the action. I have to click that action component again for it to work.

When I used a PhaseListener to track the JSF lifecycle, I find that after the redirect, Step 6, i.e.renderResponse phase is missing. Could this be the issue? How can I resolve this?

A: 

This is likely a bug in the Javascript generated by the JSF component in question. What make/version is it? Sun JSF RI 1.1? I recall some bugs like this, but those are already fixed more than 3 years ago. Make sure that you're using the latest version of the JSF implementation in question. You can get Sun Mojarra (formerly known as Sun JSF RI) here and Apache MyFaces here.

BalusC