Wednesday, September 2, 2015

JSF, How to get current xhtml path in Bean


All you need is available in FacesContext :

FacesContext facesContext = FacesContext.getCurrentInstance();
String viewId = context.getViewRoot().getViewId();
System.out.print(viewId); //will print your current path URL

17 comments:

  1. Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
    python Training in Pune
    python Training in Chennai
    python Training in Bangalore

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Very amazing post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.


    Java training in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Online Training

    ReplyDelete
  4. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.

    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  5. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.data science course in Hyderabad

    ReplyDelete
  6. Really an awesome blog, with informative and knowledgeable content. Thanks for sharing this blog with us. Keep sharing more stuff again.
    AI Patasala Data Science Training in Hyderabad

    ReplyDelete
  7. This post is so helpfull and interavtive.Keep updating with more informaion...
    Need For Computer Security
    Cyber Security Techniques

    ReplyDelete
  8. I finally found great post here.I will get back here. I just added your blog to my bookmark sites. thanks.Quality posts is the crucial to invite the visitors to visit the web page, that's what this web page is providing.data science course business analytics course in kanpur

    ReplyDelete