title: org.apache.tiles.util.TilesIOException: JSPException including path '/login.jsp'
body: <p>I m new to tiles and strut2.
  I am not able to understand that when I use the HTML tag in login.jsp page then it works fine but at the same time if I code in struts tag in login.jsp then it gives an error. why this is happening I am not able to understand. The following code and error are given below ..kindly help me</p>
  <blockquote>
  <p>HTTP Status 500 - Internal Server Error</p>
  <p>type Exception report</p>
  <p>messageInternal Server Error</p>
  <p>descriptionThe server encountered an internal error that prevented it
  from fulfilling this request.</p>
  <p>exception</p>
  <p>javax.servlet.ServletException: Error executing tag: JSPException
  including path '/baseLayout.jsp'.</p>
  <p>root cause</p>
  <p>org.apache.tiles.TilesException: JSPException including path
  '/baseLayout.jsp'.</p>
  <p>root cause</p>
  <p>org.apache.tiles.util.TilesIOException: JSPException including path
  '/baseLayout.jsp'.</p>
  <p>root cause</p>
  <p>org.apache.tiles.util.TilesIOException: JSPException including path
  '/login.jsp'.</p>
  <p>root cause</p>
  <p>The Struts dispatcher cannot be found.  This is usually caused by
  using Struts tags without the associated filter. Struts tags are only
  usable when the request has passed through its servlet filter, which
  initializes the Struts dispatcher needed for this tag. - [unknown
  location]</p>
  <p>note The full stack traces of the exception and its root causes are
  available in the GlassFish Server Open Source Edition 4.1 logs.</p>
  </blockquote>
  <p>web.xml</p>
  <pre><code>  &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
     xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; 
     xmlns:web=&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
     xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee 
     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;
     id=&quot;WebApp_ID&quot; version=&quot;2.5&quot;&gt;
     &lt;display-name&gt;Struts2Example15&lt;/display-name&gt;
      
     &lt;context-param&gt;
     &lt;param-name&gt;
        org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
     &lt;/param-name&gt;
     &lt;param-value&gt;
        /WEB-INF/tiles.xml
     &lt;/param-value&gt;
     &lt;/context-param&gt;
  
     &lt;listener&gt;
     &lt;listener-class&gt;
        org.apache.struts2.tiles.StrutsTilesListener
     &lt;/listener-class&gt;
     &lt;/listener&gt;
  
      &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
     &lt;/welcome-file-list&gt;
     
     &lt;filter&gt;
     &lt;filter-name&gt;struts2&lt;/filter-name&gt;
     &lt;filter-class&gt;
     org.apache.struts2.dispatcher.FilterDispatcher
     &lt;/filter-class&gt;
     &lt;/filter&gt;
  
     &lt;filter-mapping&gt;
        &lt;filter-name&gt;struts2&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
     &lt;/filter-mapping&gt;
  
     
  &lt;/web-app&gt;
  </code></pre>
  <p>struts.xml</p>
  <pre><code>&lt;!DOCTYPE struts PUBLIC
  &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
  &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;
  
  &lt;struts&gt;
   
      &lt;!-- Configuration for the default package. --&gt;
      &lt;package name=&quot;default&quot; extends=&quot;struts-default&quot;&gt;
          &lt;result-types&gt;
              &lt;result-type name=&quot;tiles&quot; class=&quot;org.apache.struts2.view.tiles.TilesResult&quot;/&gt; 
              &lt;/result-types&gt;  
          &lt;action name=&quot;loginAction&quot; class=&quot;package_entry.loginAction&quot; method=&quot;execute&quot;&gt;
              &lt;result name=&quot;getin&quot;&gt;welcome.jsp&lt;/result&gt;
               &lt;result name=&quot;user_login&quot;&gt;user_login.jsp&lt;/result&gt;
          
          &lt;/action&gt;
  
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  <p>index.jsp</p>
  <pre><code>&lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&gt;
          &lt;%@page language=&quot;java&quot;%&gt;
      &lt;%@taglib uri=&quot;http://tiles.apache.org/tags-tiles&quot; prefix=&quot;tiles&quot; %&gt;
      &lt;tiles:insertTemplate template=&quot;/baseLayout.jsp&quot;&gt;
          &lt;tiles:putAttribute name=&quot;tiles&quot; value=&quot;this is tes framework&quot; type=&quot;string&quot;/&gt; 
              &lt;tiles:putAttribute name=&quot;header&quot; value=&quot;/header.jsp&quot; /&gt; 
              &lt;tiles:putAttribute name=&quot;menu&quot; value=&quot;/menu.jsp&quot; /&gt; 
              &lt;tiles:putAttribute name=&quot;body&quot; value=&quot;/body.jsp&quot; /&gt; 
              &lt;tiles:putAttribute name=&quot;footer&quot; value=&quot;/footer.jsp&quot; /&gt;   
      &lt;/tiles:insertTemplate&gt;
  </code></pre>
  <p>menu.jsp</p>
  <pre><code>&lt;%@taglib uri=&quot;/struts-tags&quot; prefix=&quot;s&quot;%&gt;
  &lt;a href=&quot;loging.jsp&quot;&gt;Login&lt;/a&gt;&lt;br&gt;
  &lt;a href=&quot;registring.jsp&quot;&gt;Register&lt;/a&gt;&lt;br&gt;
  &lt;a href=&quot;contacting.jsp&quot;&gt;Contact&lt;/a&gt;&lt;br&gt;
  </code></pre>
  <p>loging.jsp</p>
  <pre><code>&lt;%@ taglib uri=&quot;http://tiles.apache.org/tags-tiles&quot; prefix=&quot;tiles&quot; %&gt;
  &lt;tiles:insertDefinition name=&quot;login.def&quot;/&gt;
  </code></pre>
  <p>tiles.xml</p>
  
  <pre><code>&lt;tiles-definitions&gt;
   
  &lt;definition name=&quot;baseLayout&quot; template=&quot;/baseLayout.jsp&quot;&gt;
  &lt;put-attribute name=&quot;title&quot;  value=&quot;Template&quot;/&gt;
  &lt;put-attribute name=&quot;header&quot; value=&quot;/header.jsp&quot;/&gt;
  &lt;put-attribute name=&quot;menu&quot;   value=&quot;/menu.jsp&quot;/&gt;
  &lt;put-attribute name=&quot;body&quot;   value=&quot;/body.jsp&quot;/&gt;
  &lt;put-attribute name=&quot;footer&quot;   value=&quot;/footer.jsp&quot;/&gt;
  &lt;/definition&gt;
   
  &lt;definition name=&quot;login.def&quot; extends=&quot;baseLayout&quot;&gt;
  &lt;put-attribute name=&quot;title&quot;  value=&quot;Login form&quot;/&gt;
  &lt;put-attribute name=&quot;body&quot;   value=&quot;/login.jsp&quot;/&gt;
  &lt;/definition&gt;
   
  &lt;definition name=&quot;register.def&quot; extends=&quot;baseLayout&quot;&gt;
  &lt;put-attribute name=&quot;title&quot;  value=&quot;Register&quot;/&gt;
  &lt;put-attribute name=&quot;body&quot;   value=&quot;/register.jsp&quot;/&gt;
  &lt;/definition&gt;
   
  &lt;definition name=&quot;contact.def&quot; extends=&quot;baseLayout&quot;&gt;
  &lt;put-attribute name=&quot;title&quot;  value=&quot;contact&quot;/&gt;
  &lt;put-attribute name=&quot;body&quot;   value=&quot;/contact.jsp&quot;/&gt;
  &lt;/definition&gt;
   
  &lt;/tiles-definitions&gt;
  </code></pre>
  <p>login.jsp</p>
  <pre><code>&lt;%@taglib uri=&quot;/struts-tags&quot; prefix=&quot;s&quot;%&gt;
  &lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
          &lt;title&gt;JSP Page&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;s:form&gt;
              &lt;s:textfield name=&quot;email_id&quot; label=&quot;Email&quot;/&gt;
              &lt;s:password name=&quot;password&quot; label=&quot;Password&quot;/&gt;
              &lt;s:submit value=&quot;login&quot;/&gt;
          &lt;/s:form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>