I am trying to implement tiles in my application. I have configured all files properly(as far as i am concerned, since i was learning it from tutorials on web) but when i run my application it gives me an java.lang.NullPointerException for Tiles. So can anyone please tell me whats wrong with my configuration.
I am getting the following error in console of eclipse
Are you using container such as Tomcat 6.x or 7.x ? if yes you don't need to specify these
all you need to do is just put struts.jar and all other jar files in /WEB-INF/lib i don't know that is solution for your case but from your looking at your web.xml file i think of this so try it
Hello Yogesh Thank you for your reply but that didn't solve my problem. I am using resin 4.0. But yes your suggestion will help me eradicate unwanted code in my application.
I solved the error. Actually it was occurring due to old .tld file in my tils-defs.xml and baseLayout.jsp files.
I replace the previous one
with this new one
You can easily see the difference between the older put tags versus newer put-attribute tags.
But the important thing to change is this URL <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://jakarta.apache.org/struts/dtds/tiles-config_2_0.dtd">
with
this one <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">.