Initialize JSF page?

Posted on 2005-03-29
Medium Priority
Last Modified: 2012-05-05
before JSF page present first,i need initialize back bean data(from database) that the JSF page used.how can i do it?back bean scope is Request.

Thank You!
Question by:konrad_ying
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

arun99907 earned 150 total points
ID: 13660901
You can put an empty preStart.jsp page and inside web.xml add this to the welcome page list.


Keep a javaScript for OnLoad() of the page and submit the page to firstPage.jsp with  faces-config.xml having the following navigation rule.

       for navigating from preStart page to firstPage.jsp
              outcome is always success because onLoad will be called first.
              Note: while submitting it on load see to it that you mention the outcome of submit to success.

Just where you are submitting it,

try to write the following :

<h:inputHidden id="putValuesFromDatabase" value="#{PreBacking.methodToSetBeanValuesFromDatabase}"/>

I guess you understood the logic.

All we do here is just put everything with an empty page onLoad as *.do are not present in JSF unlike Java Struts.

I hope u understood me. Thanks. get back to me if you have doubts.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introducing Priority Question, our latest feature.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month10 days, 7 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question