java

How to read the files placed in WEB-INF from JSF

Reading files from WEB-INF in JSF This no different than reading files from a Servlet except it involves a extra step of getting ServletContext from FacesContext FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = context.getExternalContext(); ServletContext sc = (ServletContext)externalContext.getContext(); String sc.getRealPath("/WEB-INF/somefile.xml");FacesContext context = FacesContext.getCurrentInstance(); ExternalContext externalContext = context.getExternalContext(); ServletContext sc = (ServletContext)externalContext.getContext(); String sc.getRealPath("/WEB-INF/somefile.xml"); Here we …

How to read the files placed in WEB-INF from JSF Read More »

UnsatisfiedLinkError: javaxpcomglue.dll: Can’t find dependent libraries

While playing around with JavaXPCOM I have run into couple issues. I am running on window 7 64 bit. When trying to initialize my GRE (Gecko Runtime Environment) I got following exception Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\xulrunner-sdk\bin\javaxpcomglue.dll: Can’t find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699) at java.lang.Runtime.load0(Runtime.java:770) at java.lang.System.load(System.java:1003) at org.mozilla.xpcom.internal.JavaXPCOMMethods.registerJavaXPCOMMethods(JavaXPCOMMethods.java:57) …

UnsatisfiedLinkError: javaxpcomglue.dll: Can’t find dependent libraries Read More »

TabWidget demo project

Sorry it took little longer than expected, run in some issues with cupcake (SDK 1.5) I have attached a Demo project for all interested with  some screenshots and modified .project for TabWidget Project(fixes cupcake problem ref http://groups.google.com/group/android-developers/browse_thread/thread/5537ae10e4143240) if you use eclipse. 1. My env: Eclipse Version: 3.4.2 Android SDK 1.5 Windows 2.After you import the …

TabWidget demo project Read More »

Custom Android Tabs

Due to limitation of Android Tab component I created a custom TabWidget that I am using in couple different projects already. The widget allows us to  add custom background and use custom icons, tabs   can be Top/Bottom aligned. Currently tabs can launch new Activity and  Dialog , when starting new Activity we can use  “startActivityForResult” …

Custom Android Tabs Read More »