• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Tiles Error : java.lang.NullPointerException

 
Ranch Hand
Posts: 37
Netbeans IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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



web.xml



tiles-defs.xml




struts.xml



Any Help will be highly appreciated!
 
Ranch Hand
Posts: 94
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Amit Goda
Ranch Hand
Posts: 37
Netbeans IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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">.

Hope it helps some other facing the same problem.

Cheers

 
Put the moon back where you found it! We need it for tides and poetry and stuff. Like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!