redirect « Bean « JSF Q&A

1. Access request Attributes (Set in managed bean before redirect) in Filter by precreating FacesContext

I am setting the request attribute in managed bean before redirect the request through faces-config as follows:


return "redirect_success";
After this i m trying to access this request attribute in my filter through ...

2. JSF : I want to send POST request inside action bean

I have an action bean method:

public void submitForm() {
// here bean save some information about input data in local DB
//  I should redirect to external system page with post params.
So ...

3. Redirect to a JSP with a different content type from a JSF managed bean

I have a dynamic form that I would like to show in a MS Word format when I press a button that calls a method in a JSF managed bean, but ...

4. JSF2.0 View Scope & Redirect

I have the follwing problem with the new ViewScope in JSF2.0. I have a class annotated as a view scope bean with a @PostConstruct method

@ManagedBean(name = "userListController")
public class UserListController {


5. ending conversation scoped bean and then redirect when command button clicked

I have a simple command button

<h:commandButton value="Create Form Event" action="#{formEventController.createFormEvent}"/>
which calls the following simple action listener
public class FormEventController implements Serializable
    private Conversation conversation;


6. Redirect form managed bean constructor throwing "java.lang.IllegalStateException"

In my JSF application I need to redirect from the the managed bean constructor. I have following code to do so:

HttpServletResponse httpServletResponse = (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
but this is throwing following exception:

7. JSF-1.2-Question. Strategy for saving current application-state(managed bean state) when redirecting to external service

Definition --

  • There is working web-app with managed-bean state at some point.
  • this web-app posts request to external-application
  • External-application calls-back(http 'get' method) to web-app -- At this time application should restore managed-bean state as it ...