Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!

James Maddison

Greenhorn
+ Follow
since Apr 12, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Maddison

Hi Remko,

I tried what you suggested but I'm getting the following error:

javax.faces.FacesException: /login.jsp(49,3) According to TLD or attribute directive in tag file, attribute value does not accept any expressions

What I tried to do is:

<f:param
value="${headerVal}"
id="userBean"
name="userName" />

Am I doing it wrong? Thanks again for your help.
15 years ago
JSF
Hi everyone,

I'm a newbie with JSF so please bear with me. I would like to pass a HTTP header value to my backing bean but I'm not sure how to go about doing so. At present, the user's input is passed on to my backing bean in the standard form of

<h:inputText value="#{userBean.userName}" />

However, I would like userName to be assigned the value of a HTTP header, which is in the form of:

String headVal = request.getHeader("shib host");

So basically, I would like headVal to be passed on to my backing bean instead of the user's input. How would I do this? Any help in this matter would be greatly appreciated. Cheers.
15 years ago
JSF