File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Tiles Error : java.lang.NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles Error : java.lang.NullPointerException" Watch "Tiles Error : java.lang.NullPointerException" New topic

Tiles Error : java.lang.NullPointerException

Amit Goda
Ranch Hand

Joined: Jan 21, 2012
Posts: 37


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




Any Help will be highly appreciated!

Yogesh Lonkar
Ranch Hand

Joined: Jul 17, 2012
Posts: 94

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

Learning some thing New Every Day
Amit Goda
Ranch Hand

Joined: Jan 21, 2012
Posts: 37

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" "">


this one <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "">.

Hope it helps some other facing the same problem.


I agree. Here's the link:
subject: Tiles Error : java.lang.NullPointerException
It's not a secret anymore!