wood burning stoves 2.0*
The moose likes Struts and the fly likes Tiles Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Tiles Error" Watch "Tiles Error" New topic

Tiles Error

Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
When i integrate tiles with struts its giving the following error

Error Page
The following java.lang.NullPointerException Occured

Exception occured in the following place

at org.apache.struts.taglib.tiles.InsertTag.processAttribute(InsertTag.java:689)
at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(InsertTag.java:489)
at org.apache.struts.taglib.tiles.InsertTag.doStartTag(InsertTag.java:451)
at _jsp._cts_2d_web._jspService(cts-web.jsp:20)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)

Help me please..............
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
you have a tiles definition defined in your xml that extends a master tile that contains less attributes than what you provided in your master definition. basically, your master tile jsp has a tiles:insert tag that doesn't have a value provided for as specified by the attribute(either in the tiles-def.xml or in the specific tiles jsp). make sure a value is provided for each tiles:insert that you defined.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Srilakshmi Vara
Ranch Hand

Joined: Jul 21, 2004
Posts: 169
Thanks Alan...

To use a tiles definition, we need to create a definition in tiles-defs.xml and can start using the definition in any jsp with <put> tag right?

If i am wrong will you tell me how to do it?
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
follow the tiles 101 section

i highly recommend following solution #6 and #7 to use tiles declaratively.
norman andrew

Joined: Jun 07, 2005
Posts: 1
I had exactly the same error. After hours, I found a trick to do before searching paths diplayed above.
Clean the Work dir of tomcat, simple, isn't it ! Looks like this incredibly stupid thing keeps some data even after full server start. it could simply prevent you from having a good display even after correcting the tiles issues.
BadalDeepali Garg

Joined: Jun 13, 2005
Posts: 4
<definition name="xxx" path="folder for jsp /aaa.jsp">
<put name="header" value="/folder for jsp /header.jsp" />
<put name="body" value="" />
<put name="footer" value="folder for jsp /aaa.jspfooter.jsp" />

<definition name="as u want to put in struts_config.xml" extends="xxx">
<put name="body" value="/folder for jsp /homepage.jsp" />
I agree. Here's the link: http://aspose.com/file-tools
subject: Tiles Error
Similar Threads
Problem Using Tiles
Internal Server Error 500
servlet exception in index page of my website.
illegalstateexception i am getting
Error writing endDocument HttpIOException