Solved

Tiles: No Such definition error.

Posted on 2009-04-03
6
1,517 Views
Last Modified: 2012-05-06
Hi. I have a struts 2, hibernate, spring. In struts, I integrate with tiles. Initially I use struts 2.0.8. Now I migrate to use struts 2.1.6. After chaning all the jars, I got following error in starting page. It seems it could not find my definitions. Are there some jars missing or Are there some mis configured parameters? Your help is highly appreciated.

HTTP Status 500 -
 

type Exception report
 

message
 

description The server encountered an internal error () that prevented it from fulfilling this request.
 

exception
 

javax.servlet.ServletException: javax.servlet.jsp.JspException: Error executing tag: welcome

	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:837)

	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)

	org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspService(index_jsp.java:71)

	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)

	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)

	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)

	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
 

root cause
 

org.apache.tiles.definition.NoSuchDefinitionException: welcome

	org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:578)

	org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)

	org.apache.tiles.jsp.taglib.InsertDefinitionTag.render(InsertDefinitionTag.java:63)

	org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:154)

	org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)

	org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)

	org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspx_meth_tiles_005finsertDefinition_005f0(index_jsp.java:89)

	org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspService(index_jsp.java:64)

	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)

	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)

	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)

	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)

	org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)

	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)

	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)

	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
 

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.

Open in new window

index.jsp.txt
Layout.jsp.txt
struts.xml.txt
web.xml.txt
Taglibs.jsp.txt
0
Comment
Question by:JianJunShen
  • 4
  • 2
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 24065757
where are your tiles defs?

0
 

Author Comment

by:JianJunShen
ID: 24065963
Sorry, I forget to upload it. I will upload it next Tuesday.
0
 

Author Comment

by:JianJunShen
ID: 24071956
Here comes tiles-defs.xml Thanks in advance
tiles-defs.xml.txt
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 92

Assisted Solution

by:objects
objects earned 500 total points
ID: 24073205
does the log show the tiles being loaded during startup?
check log for errors during startup

0
 

Author Comment

by:JianJunShen
ID: 24153921
Yes, you are right. Tiles are not correctly loaded. It is because listener is properly configured. I will make another post to give the soluction.
0
 

Accepted Solution

by:
JianJunShen earned 0 total points
ID: 24168051
The following codes show the correct configuration. Please note:  <dispatcher>REQUEST</dispatcher>
                                                                                                                          <dispatcher>INCLUDE</dispatcher>
   <filter>

         <filter-name>filterDispatcher</filter-name>

         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

     </filter>
 

   

    <filter-mapping>

            <filter-name>filterDispatcher</filter-name>

            <url-pattern>/*</url-pattern>

            <dispatcher>REQUEST</dispatcher>

            <dispatcher>INCLUDE</dispatcher>

    </filter-mapping>

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse java  build path 6 45
JavaScript/Java - Changing an image background color 4 56
Arrays.asList  VS  ArrayList 4 45
hibernate jars 4 9
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now