I have written a liferay richfaces portlet. But iam not able to get the css path or images in the web-inf folder. My portlet config is
<portlet>
<portlet-name>testLR6_PB3_RF4</portlet-name>
<instanceable>true</instanceable>
<render-weight>1</render-weight>
<ajaxable>true</ajaxable>
<header-portlet-css>/resources/css/style.css</header-portlet-css>
<header-portlet-javascript>/js/eims.js</header-portlet-javascript>
<footer-portlet-javascript>/js/fileupload.js</footer-portlet-javascript>
</portlet>
and in my jsf page
<link href="${facesContext.externalContext.requestContextPath}/resources/css/style.css" rel="stylesheet" type="text/css" />
<div class="floatleft1"><img src="${facesContext.externalContext.requestContextPath}/resources/images/eims_logo.jpg" /></div>
how to get the resources path.
this my java servletcontext code
FacesContext context = FacesContext.getCurrentInstance();
ServletContext servletContext= (ServletContext) context.getCurrentInstance().getExternalContext().getContext();
String path=servletContext.getRealPath("/");
MainBean mainBean = new MainBean();
mainBean.getUserBean().setUserPath(path);