InterviewSolution
| 1. |
How To Get Current Page Url From Backing Bean? |
|
Answer» 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, 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, |
|