This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
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

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(
at org.apache.struts.taglib.tiles.InsertTag.createTagHandler(
at org.apache.struts.taglib.tiles.InsertTag.doStartTag(
at _jsp._cts_2d_web._jspService(cts-web.jsp:20)
at com.orionserver.http.OrionHttpJspPage.service(
at oracle.jsp.runtimev2.JspPageTable.service(
at oracle.jsp.runtimev2.JspServlet.internalService(
at oracle.jsp.runtimev2.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at com.evermind.server.http.ResourceFilterChain.doFilter(
at Source)
at com.evermind.server.http.ServletRequestDispatcher.invoke(
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(
at com.evermind.server.http.HttpRequestHandler.processRequest(
at com.evermind.util.ReleasableResourcePooledExecutor$

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="" target="_blank" rel="nofollow"></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:
subject: Tiles Error