Hmm,

I got the idea from Chuck Cavaness's book (Programming Jakarta Struts).  On
page 347, he does this.  Perhaps the book is wrong.  Does Chuck frequent
this list?

Joshua



-----Original Message-----
From: Kuzminski, Nicolas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 3:33 PM
To: Struts Users Mailing List
Subject: RE: Beginner Tiles Problem


Besides, any one knows if it's posible to have an url association with tiles
definitions, as we have with actions and, for example, /*.do urls? 
It would be great to have, let's say, /*.def requests....

Saludos, Nicolas.

-----Original Message-----
From: Kuzminski, Nicolas 
Sent: Martes, 04 de Marzo de 2003 17:30
To: Struts Users Mailing List
Subject: RE: Beginner Tiles Problem


The problem is, you can't use a definition as a plain forward. It does not
work as a url. Try this instead:

    <action path="/go" 
 
type="org.apache.struts.tiles.actions.DefinitionDispatcherAction" 
            parameter="def"> 
      <forward name="success"            path="/ok"/>
      <forward name="error"              path="/err"/>
    </action>

(those two forwards are required, don't know why)

And redefine the forward:

        <forward name="welcome" path="/go.do?def=my.default"
redirect="false"/>

So now you have a real url that points to a definition: /go.do?def=anydef.

Saludos, Nicolas.


-----Original Message-----
From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]
Sent: Martes, 04 de Marzo de 2003 17:28
To: [EMAIL PROTECTED]
Subject: Beginner Tiles Problem


I have successfully set up tiles using a tiles-def.xml file.  In this file,
I have set up a definition for "my.default".

I have been successfully able to view this layout by inserting the following
code into a jsp:
        <%@ taglib uri="struts-html" prefix="html"%>
        <%@ taglib uri="struts-bean" prefix="bean"%>
        <%@ taglib uri="struts-tiles" prefix="tiles"%>
        <tiles:insert definition="my.default"/>

Again, this works fine.  I have been attempting to declare a global forward
mapping for the same layout:
    <global-forwards>
        <forward name="welcome" path="my.default" redirect="false"/>
    </global-forwards>

I have inserted the following code into a jsp file to test the forwards:
        <%@ taglib uri="struts-logic" prefix="logic"%>
        <logic:forward name="welcome"/>

When I hit the page containing this code, Tomcat gives me a 404 ("The
requested resource (/myapp/my.default) is not available.").  Whats happening
here?  

Joshua



This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential or privileged 
information. If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited. If 
you are not the intended recipient, please notify the sender 
immediately by return email and delete this communication and destroy all
copies.


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


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

Reply via email to