This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have David & Dawn Griffiths on-line!
See this thread for details.
Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Passing hidden values to sendRedirect() in JSF

Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I am at beginer level for JSF; Need help.
I am using JSF in my application in which I want to pass values in request which is being redirected using sendRedirect() method.
and also the paramerters should not be visible in URL.

Or in other words:

The line in bold; I want to pass some key-values for the above page request.

Is there any facility availabel in JSF where I can pass the key/value to the above page request which
is not visible in URL?

Thanks in advance!!


Saloon Keeper
Posts: 24551
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you'll notice, the faces-config element is named view-id, not view-url. It means literally that. It's not a URL, it's the name of the view.

JSF works primarily using HTTP POST's, and putting parameters on a URL is a feature of HTTP GET, not POST.

There's basically 2 ways to handle this.

1. Encode an HTTP Link, instead of a command on the source view. This has the disadvantage of not invoking an JSF action.

2. Pass the parameter data to the destination view using a backing bean. This is the common solution.
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic