Download Android App in your Android Device from Google Play Store
- Search for "Withoutbook Practice Exam Test" in Mobile/Tablet Play Store
Practice InterviewNew Search by Name or Email

Exams Attended

Make Homepage

Bookmark this page

Subscribe Email Address

JSF Interview Questions and Answers

Ques. How to get current page URL from backing bean?
Ans. You can get a reference to the HTTP request object via FacesContext like this:

FacesContext fc = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest) fc.getExternalContext().getRequest();

and then use the normal request methods to obtain path information. Alternatively,

will return you the name of the current JSP (JSF view IDs are basically just JSP path names).
Is it helpful? Yes No

Most helpful rated by users:

©2020 WithoutBook