Note that there are some explanatory texts on larger screens.

plurals
  1. POStruts2/Tiles internal exception
    primarykey
    data
    text
    <p>I have a JSP, which calls an action using the <code>&lt;s:action&gt;</code> tag:</p> <pre><code>&lt;s:form&gt; &lt;s:action name="myaction" namespace="/utente/include" executeResult="true" ignoreContextParams="true" var="formattazione" /&gt; //do something &lt;/s:form&gt; </code></pre> <p>The action <code>myaction</code> is called, i can follow the flow debugging it. It finishes fine without error, it returns success, but then there is an error and i can't understand which one.</p> <p>The action definition:</p> <pre><code>&lt;package name="utente-include" namespace="/utente/include" extends="tiles-default"&gt; &lt;action name="myaction" class="com.emaborsa.doctracing.web.action.formattazione.FormattazioneCriteriUtenteAction" method="formattazione"&gt; &lt;result type="tiles"&gt;mytiles.def&lt;/result&gt; &lt;/action&gt; &lt;/package&gt; </code></pre> <p>The tiles definition:</p> <pre><code>&lt;definition name="mytiles.def" template="/pages/empty.jsp"&gt; &lt;put-attribute name="body" value="/pages/mypage.jsp"/&gt; &lt;/definition&gt; </code></pre> <p>The empty.jsp:</p> <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&gt; &lt;%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %&gt; &lt;tiles:insertAttribute name="body" /&gt; </code></pre> <p>The Exception:</p> <pre><code>GRAVE: Servlet.service() for servlet jsp threw exception java.lang.NullPointerException at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49) at org.apache.jsp.pages.utente.elencoUtenti_jsp._jspx_meth_s_005fif_005f0(elencoUtenti_jsp.java:215) at org.apache.jsp.pages.utente.elencoUtenti_jsp._jspx_meth_s_005fform_005f0(elencoUtenti_jsp.java:155) at org.apache.jsp.pages.utente.elencoUtenti_jsp._jspService(elencoUtenti_jsp.java:87) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) ..... </code></pre> <p>EDIT: i thought it works, but it doesn't. Actually the system doesn't crash, but the tiles-page is not included in the mail page. The Exception i get:</p> <pre><code>org.apache.tiles.impl.CannotRenderException: No request dispatcher returned for path '/../pages/common/myPage.jsp' at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:680) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:633) at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:322) at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105) at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) </code></pre> <p>Here my myPage.jsp (actually it doesn't matter what is written in):</p> <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&gt; &lt;%@ taglib prefix="s" uri="/struts-tags" %&gt; &lt;div class="navigazioneElenco" id="navigazioneElenco"&gt; &lt;/div&gt; </code></pre> <p>Here i share a part of my project. There is only the part which is not working... <a href="http://www.emaborsa.com/Altro/MyProject.rar" rel="nofollow">DOWNLOAD</a></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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