Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting null for getRealPath.

843844Jul 6 2009 — edited Jul 6 2009
Hi All,

Having 'resources' folder under WEB-INF folder, whiile trying to get RealPath it is returning 'null' value in basePath variable.

       HttpSession session = (HttpSession) FacesContext.getCurrentInstance().
                                                                getExternalContext().getSession(true);
        String basePath = session.getServletContext().getRealPath("/WEB-INF/resources");
  
Please let me know how to get real path in JSF.

Thanks,
Sharath.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2009
Added on Jul 6 2009
1 comment
291 views