• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Tiles Error : java.lang.NullPointerException

 
Ranch Hand
Posts: 37
Netbeans IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Normally trees don't drive trucks. Does this tiny ad have a license?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic