Hi Xavier,

   looking at the error, it seems instead of looking at "formaction" attribute 
as String, it's attempting to interpret it as a Page, and it's not able to find 
the login.jsp in the 'document root' area. 

    If you need to pass in just a String value you may use type="String" or, 
direct="true" as part of the insert tag.
    i.e. 
      <put type="String" name="formaction" value="login.jsp"/> 
        or,
        <put name="formaction" value="login.jsp" direct="true" />

    Alternatively in the JSP template/layout page you can use 
<tiles:getAsString name="formaction" /> instead of <tiles:insert 
page="formaction" />

    HTH,

    Dharmendra
ps: have a good day!
-----Original Message-----
From: Xavier Vanderstukken [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 07, 2005 1:07 PM
To: user@struts.apache.org
Subject: Tile usage


I have a main layout :

<definition name="Main" path="/layout.jsp">
        <put name="navbar" value="navigation.jsp"/>
        <put name="login" value="login.jsp"/>
        <put name="locale" value="locale.jsp"/>
        <put name="body"   type="string"/>    
    </definition>


I extend the main definition :

<definition name=".register" extends="Main">
        <put name="body"  value="ResultBased" type="definition"/>
</definition>

And finally here is the body

<definition name="ResultBased">
        <put name="formaction" value="login.jsp"/>
        <put name="display" value="sample.jsp"/>       
    </definition>

With that configuration I receive an exception :
java.lang.NullPointerException
    at 
org.apache.jasper.runtime.JspRuntimeLibrary.getContextRelativePath(JspRuntimeLibrary.java:908)
    at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:963)
    at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:604)
    at 
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
    at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
    at 
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
    at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
    at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
    at 
org.apache.jsp.layout_jsp._jspx_meth_tiles_insert_2(org.apache.jsp.layout_jsp:205)
    at 
org.apache.jsp.layout_jsp._jspx_meth_html_html_0(org.apache.jsp.layout_jsp:125)
    at org.apache.jsp.layout_jsp._jspService(org.apache.jsp.layout_jsp:72)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
    at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
    at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
    at 
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at 
org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:239)
    at 
org.apache.struts.tiles.TilesRequestProcessor.internalModuleRelativeForward(TilesRequestProcessor.java:341)
    at 
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:560)
    at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
    at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to