Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems getting Tiles work with Struts2
    primarykey
    data
    text
    <p>I'm using struts 2.2.1 and tiles 2.2.2. I've done every step described <a href="http://java.dzone.com/articles/struts2-tutorial-part-47" rel="nofollow noreferrer">here</a> but I cannot get tiles work... I get the following error while deploying my war to glassfish 3.1:</p> <pre><code>[#|2011-10-04T08:43:28.117+0200|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=74;_ThreadName=AutoDeployer;|Exception while invoking class com.sun.enterprise.web.WebApplication start method java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener at com.sun.enterprise.web.WebApplication.start(WebApplication.java:130) </code></pre> <p>In my WEB-INF/lib I've got commons-collections-3.1.jar, commons-fileupload-1.2.1.jar, struts2-core-2.2.1.jar, tiles-api-2.2.2.jar, tiles-core-2.2.2.jar, tiles-jsp-2.2.2.jar and xwork-core-2.2.1.jar.</p> <p>This is my struts.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"&gt; &lt;struts&gt; &lt;constant name="struts.devMode" value="true" /&gt; &lt;package name="basicstruts2" extends="struts-default"&gt; &lt;interceptors&gt; &lt;interceptor-stack name="appDefault"&gt; &lt;interceptor-ref name="defaultStack"&gt; &lt;param name="exception.logEnabled"&gt;true&lt;/param&gt; &lt;param name="exception.logLevel"&gt;ERROR&lt;/param&gt; &lt;/interceptor-ref&gt; &lt;/interceptor-stack&gt; &lt;/interceptors&gt; &lt;default-interceptor-ref name="appDefault" /&gt; &lt;result-types&gt; &lt;result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" /&gt; &lt;/result-types&gt; &lt;global-results&gt; &lt;result name="exception"&gt;/jsp/exceptions/exception.jsp&lt;/result&gt; &lt;result name="webServiceException"&gt;/jsp/exceptions/webserviceexception.jsp&lt;/result&gt; &lt;/global-results&gt; &lt;global-exception-mappings&gt; &lt;exception-mapping exception="java.lang.Exception" result="exception" /&gt; &lt;exception-mapping exception="java.io.IOException" result="exception" /&gt; &lt;exception-mapping exception="exceptions.WebServiceExceptionForStruts" result="webServiceException" /&gt; &lt;/global-exception-mappings&gt; &lt;action name="tilesTest" class="test.action.TilesTest"&gt; &lt;result name="success" type="tiles"&gt;/welcome.tiles&lt;/result&gt; &lt;/action&gt; &lt;action name="index"&gt; &lt;result&gt;/jsp/index.jsp&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; &lt;/struts&gt; </code></pre> <p>After inserting the code into my struts.xml, I get this error in eclipse:</p> <p><img src="https://i.stack.imgur.com/KNfkS.png" alt="enter image description here"></p> <p>And this is my web.xml:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt; &lt;display-name&gt;Consumer&lt;/display-name&gt; &lt;welcome-file-list&gt; &lt;welcome-file&gt;/jsp/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.ng.filter.StrutsPrepareAndExecuteFilter&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;listener&gt; &lt;listener-class&gt;org.apache.struts2.tiles.StrutsTilesListener&lt;/listener-class&gt; &lt;/listener&gt; &lt;context-param&gt; &lt;param-name&gt;tilesDefinitions&lt;/param-name&gt; &lt;param-value&gt;/WEB-INF/tiles.xml&lt;/param-value&gt; &lt;/context-param&gt; &lt;/web-app&gt; </code></pre> <p>Thank you very much!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload