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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:58:18+00:00 2026-05-23T12:58:18+00:00

I am currently investigating JSF in my current work. In the past, while using

  • 0

I am currently investigating JSF in my current work.
In the past, while using Spring and Struts, I always do a PRG (Post-Redirect-Get) whenever
I do something that could potentially update the model.

In JSF, I have read that the framework internally makes a forward request. So is it safe
to assume that I should add redirect in those transaction that could potentially update the model?

My usecase for example. I have a JSP that display products in shopping cart, user can perform payment transaction.
I dont want them to pay twice so I want to perform redirect

<navigation-rule>
   <from-view-id>/viewCart.jsp</from-view-id>
   <navigation-case>
      <from-outcome>pay</from-outcome>
      <to-view-id>/successPay.jsp</to-view-id>
      </redirect>
   </navigation-case>
</navigation-rule>

I worry about the user using their Back Button or hit Refresh on the browser?

Is my thinking correct or there is an alternative in JSF for these cases
Thanks.

  • 1 1 Answer
  • 0 Views
  • 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. Editorial Team
    Editorial Team
    2026-05-23T12:58:18+00:00Added an answer on May 23, 2026 at 12:58 pm

    Yes, adding <redirect/> is one of the right ways to make it a PRG.

    Other ways involve manually calling ExternalContext#redirect() in bean action method, or (in JSF 2.x only) adding faces-redirect=true parameter to the (implicit navigation) outcome value, which can also be done by a custom configurable navigation handler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I come from a CVS background. I'm currently investigating using SVN for a project.
I am currently investigating using the selenium-on-rails plug-in for testing an upcoming web app
we're currently investigating SVN at work - having escalated our practices to include a
I've currently investigating ways of improving our current c++ network hand-made serialization mechanism maintaining
I am currently investigating replacing the tabs provided by a Struts 1 tag library
I'm trying to understand how threads work in Java and currently investigating how to
I am currently investigating whether to build a windows application using unmanaged C/C++ or
I'm currently investigating whether ActsAsTaggableOn is going to work for my needs. Specifically, I
We are currently investigating options for migrating a legacy application built using .NET 1.1
I am currently investigating several free/open source OpenGL based 3D engines, and was wondering

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.