I have a problem with accessing an external file from my back bean. What I would like to do is to use ttf file in order to use the font through iText library. When I run my application via Netbeans 7.2 the code below works fine:
private static String fontPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath("arialuni.ttf");
But as I deploy my ear file manually through Oracle Weblogic 11g console, ttf file is not found and I get NullPointerException.
I have tried several ways to get it work but no chance. If someone could help me, I would be greatly appriciated.
Regards