This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I need to access backing bean variables directly from the JSP. Not able to figure out how to do it. I created a Hashtable (details) and String (header) variables in the backing bean and initialized both in the corresponding backing bean constructor. Now I want to access those two variables from the JSP and apply some logic to format them properly. How can I do it?
Backing beans are not some sort of magical creation that only JSF understands. Backing beans are ordinary Javabeans that have been wired into the JSF application. JSF can construct them and connect them together, but unlike Struts formbeans and action beans, they don't have any special properties or attributes of their own.
So if you want to get at a session backing bean, use the same technique you'd use to get at any other J2EE session bean.
An IDE is no substitute for an Intelligent Developer.
Joined: Sep 25, 2002
In the given example find.jsp is JSF only. I am treating JSF means backing bean with an associated JSP. In my JSF I can access the backing bean attribuites trough <hutputtext ..../> etc., Now I want to access those backing bean attributes between