• 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Tiles Error

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

java.lang.NullPointerException
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..............
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.theserverside.com/articles/article.tss?l=Tiles101
follow the tiles 101 section

http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html
i highly recommend following solution #6 and #7 to use tiles declaratively.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<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>


<definition name="as u want to put in struts_config.xml" extends="xxx">
<put name="body" value="/folder for jsp /homepage.jsp" />
</definition>
 
I found a beautiful pie. And a 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!