Your web.xml file can have a listener for StrutsTilesListener. Make sure your 
TilesInterceptor is implemented. 

-----Original Message-----
From: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 10, 2007 2:54 PM
To: 'Struts Users Mailing List'
Subject: RE: [Struts 2] Tiles plugin tutorial?

Crazyreal:

Thank you for the hint.  I did that and now I
am getting this error:

java.io.IOException: Error including path '/layout.jsp'. 
The absolute uri: http://struts.apache.org/tags-tiles cannot 
be resolved in either web.xml or the jar files deployed with 
this application.

Here is my layout.jsp file:

<[EMAIL PROTECTED] uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>
<table>
  <tr>
    <td colspan="2">
      This is the layout
    </td>
  </tr>
  <tr>
    <td>
     Body should be in next column
    </td>
    <td>
      <tiles:attribute name="body" />
    </td>
  </tr>
</table>

Do I need to define the taglib in my web.xml file?

Thanks, 
        Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: chenshibing [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 10:26 PM
To: 'Struts Users Mailing List'
Subject: 答复: [Struts 2] Tiles plugin tutorial?

Neil:

Your should extend package tiles-default and use tiles result type, as
following:

<package name="mydefault" namespace="/my" extends="tiles-default">
        <action name="top/Home">
                <result name="success"
type="tiles">tiles.definition</result>
        </action>
</package>

Package tiles-default was defined in struts2-tiles-plugin.jar, plz check the
struts-plugin.xml config file.

Best wishes!

Crazyreal

-----邮件原件-----
发件人: Neil Aggarwal [mailto:[EMAIL PROTECTED] 
发送时间: 2007年7月10日 10:59
收件人: 'Struts Users Mailing List'
主题: RE: [Struts 2] Tiles plugin tutorial?

Dave:

Thank you for the response.

I am not sure how to tell a struts action to call
a tiles layout.

I added the tiles jars to my lib directory and
then I added the listener to my web.xml:

  <listener>
 
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class
>
  </listener>

Now, lets take my action for the home page.

I have this action:

    <action name="top/Home">
      <result name="success">/top/Home.jsp</result>
    </action>

How do I tell it to use my tiles definition that 
includes the layout?

Thanks,
        Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 09, 2007 6:21 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Tiles plugin tutorial?

--- Neil Aggarwal <[EMAIL PROTECTED]> wrote:
> Is there a good tutorial for the Tiles plugin
> in struts 2?

Not yet; I was going to do that but was waiting for
Tiles 2 to settle in a bit more then I got
sidetracked.

> I am not seeing anything that gives me enough
> to move forward.

At what point are you stuck? Several folks here are
using it successfully.

d.



       
____________________________________________________________________________
________
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

---------------------------------------------------------------------
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]




---------------------------------------------------------------------
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]


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

Reply via email to