You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dylan van Iersel <dy...@van-iersel.org> on 2002/07/29 15:31:49 UTC

Tiles configuration with Struts 1.1b1

Hi all,

Can anybody tell me how to configure Struts with Tiles. Am I supposed to
use TilesRequestProcessor and if so how do I point it to the tile
definitions xml file?

In addition, am I supposed to use the TilesAction as the base class for my
actions? I am using the DispatchAction and cannot find a corresponding
TilesDispatchAction. Also, the TilesAction uses the now deprecated
perform() method.

I've plowed through, I think, all of the available documentation and found
various examples but cannot determine which one is correct.

"Am I making sense" is the correct question to end this post I think.

Dylan


--
Dylan van Iersel
--



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Eddie Bush <ek...@swbell.net>.
Excellent!

Dylan van Iersel wrote:

>Ok, I've had my third cup. It works. Thank you very much.
>Should have read Chuck's chapter a bit more thoroughly.
>
>Dylan
>
>Eddie Bush said:
>
>>I never trust myself until I have my third cup of morning coffee :-)  As
>> I said in another post, we're all human ... at least, I hope we are!
>>:-)
>>
>>Good Luck!
>>
>>Eddie
>>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Michael Delamere <ho...@michael-delamere.de>.
I´m still on my second..... no wonder I´m not quite awake yet! ;-)

Michael


----- Original Message -----
From: "Dylan van Iersel" <dy...@van-iersel.org>
To: <st...@jakarta.apache.org>
Sent: Tuesday, July 30, 2002 10:21 AM
Subject: Re: Tiles configuration with Struts 1.1b1


>
> Ok, I've had my third cup. It works. Thank you very much.
> Should have read Chuck's chapter a bit more thoroughly.
>
> Dylan
>
> Eddie Bush said:
> > I never trust myself until I have my third cup of morning coffee :-)  As
> >  I said in another post, we're all human ... at least, I hope we are!
> > :-)
> >
> > Good Luck!
> >
> > Eddie
> >
> --
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Dylan van Iersel <dy...@van-iersel.org>.
Ok, I've had my third cup. It works. Thank you very much.
Should have read Chuck's chapter a bit more thoroughly.

Dylan

Eddie Bush said:
> I never trust myself until I have my third cup of morning coffee :-)  As
>  I said in another post, we're all human ... at least, I hope we are!
> :-)
>
> Good Luck!
>
> Eddie
>
--



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Eddie Bush <ek...@swbell.net>.
I never trust myself until I have my third cup of morning coffee :-)  As 
I said in another post, we're all human ... at least, I hope we are! :-)

Good Luck!

Eddie

Dylan van Iersel wrote:

>Hi Eddie,
>
>Thanks for your reply. I must have had my head in the blender or
>something. It have encountered so much different sources of
>documentation that things got mixed up. 
>
>Anyway, I'll try your suggestion tomorrow and let you know how things
>went. Again thanks for your help and effort.
>
>Dylan
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Dylan van Iersel <dy...@van-iersel.org>.
Hi Eddie,

Thanks for your reply. I must have had my head in the blender or
something. It have encountered so much different sources of
documentation that things got mixed up. 

Anyway, I'll try your suggestion tomorrow and let you know how things
went. Again thanks for your help and effort.

Dylan



On Mon, 2002-07-29 at 17:23, Eddie Bush wrote:
    The latest nightly, in the tiles-documentation.war file, if you unpack 
    it, has a struts-config.xml.  If you notice (I'm assuming this is what 
    you referenced), the RequestProcessor override has been commented out. 
     However, the plug-in element is there!
    
    I'm basing my view off this information.  If that does not accurately 
    represent how to configure Tiles, then I am mistaken.  Mine works just 
    fine using the plugin though ;-)
    
    I recall Cedric having said that the standard actions were going to be 
    able to handle definitions directly.  My _guess_ is that they're 
    removing the requirement for the path element to start with a "/".  To 
    be honest, I'm not entirely sure what all it entails.  I really think 
    you want the plug-in element though, and not the request processor ;-) 
     If you find a definitive source that says otherwise, please reply here 
    and post a link to it - please.  I hate to misinform folks, but I 
    honestly believe I am correct.
    
    Ah ... was going to send it as it was, but I decided to reference 
    Chuck's book.  If you look at the section "Configuring Tiles to Work 
    with Struts" (Chapter 15), you'll see a note he put in that says, and I 
    quote ;-)  :
    
    With earlier versions of the Tiles framework, you had to configure a 
    special ActionServlet called ActionComponentServlet in the web.xml file. 
    You were also forced to configure a special RequestProcessor in the 
    Struts controller element. This is no longer true and a Tiles PlugIn is 
    now available and will take care of all of the initialization.
    
    Thanks!
    
    Eddie
    
    Eddie Bush wrote:
    
    > I think you have it bass-ackwards ... <goes-to-double-check/>
    >
    > Dylan van Iersel wrote:
    >
    >> I have just checked out the nightly 1.1b1. It does not include the
    >> TilesPlugin anymore and I remember having read somewhere that the
    >> TilesPlugin is to be used in Struts 1.0. I remember that for 1.1b1 one
    >> should use TilesRequestProcessor. However, when requesting an action 
    >> path,
    >> I consistently get a NullPointerException.
    >>
    >> Indeed, KUDOS to Chuck. It has helped me very much. Can't wait till my
    >> copy arrives either :-)
    >>
    >> Cheers,
    >>
    >> Dylan
    >>
    >
    >
    >
    > -- 
    > To unsubscribe, e-mail:   
    > <ma...@jakarta.apache.org>
    > For additional commands, e-mail: 
    > <ma...@jakarta.apache.org>
    
    
    
    
    --
    To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
    For additional commands, e-mail: <ma...@jakarta.apache.org>
-- 

Groeten,

Dylan

---------------------------------------
Dylan van Iersel
Email:	dylan@van-iersel.org
Web:	www.van-iersel.org
ICQ#:	46244248
---------------------------------------

-----------------------------
-------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Eddie Bush <ek...@swbell.net>.
The latest nightly, in the tiles-documentation.war file, if you unpack 
it, has a struts-config.xml.  If you notice (I'm assuming this is what 
you referenced), the RequestProcessor override has been commented out. 
 However, the plug-in element is there!

I'm basing my view off this information.  If that does not accurately 
represent how to configure Tiles, then I am mistaken.  Mine works just 
fine using the plugin though ;-)

I recall Cedric having said that the standard actions were going to be 
able to handle definitions directly.  My _guess_ is that they're 
removing the requirement for the path element to start with a "/".  To 
be honest, I'm not entirely sure what all it entails.  I really think 
you want the plug-in element though, and not the request processor ;-) 
 If you find a definitive source that says otherwise, please reply here 
and post a link to it - please.  I hate to misinform folks, but I 
honestly believe I am correct.

Ah ... was going to send it as it was, but I decided to reference 
Chuck's book.  If you look at the section "Configuring Tiles to Work 
with Struts" (Chapter 15), you'll see a note he put in that says, and I 
quote ;-)  :

With earlier versions of the Tiles framework, you had to configure a 
special ActionServlet called ActionComponentServlet in the web.xml file. 
You were also forced to configure a special RequestProcessor in the 
Struts controller element. This is no longer true and a Tiles PlugIn is 
now available and will take care of all of the initialization.

Thanks!

Eddie

Eddie Bush wrote:

> I think you have it bass-ackwards ... <goes-to-double-check/>
>
> Dylan van Iersel wrote:
>
>> I have just checked out the nightly 1.1b1. It does not include the
>> TilesPlugin anymore and I remember having read somewhere that the
>> TilesPlugin is to be used in Struts 1.0. I remember that for 1.1b1 one
>> should use TilesRequestProcessor. However, when requesting an action 
>> path,
>> I consistently get a NullPointerException.
>>
>> Indeed, KUDOS to Chuck. It has helped me very much. Can't wait till my
>> copy arrives either :-)
>>
>> Cheers,
>>
>> Dylan
>>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Eddie Bush <ek...@swbell.net>.
I think you have it bass-ackwards ... <goes-to-double-check/>

Dylan van Iersel wrote:

>I have just checked out the nightly 1.1b1. It does not include the
>TilesPlugin anymore and I remember having read somewhere that the
>TilesPlugin is to be used in Struts 1.0. I remember that for 1.1b1 one
>should use TilesRequestProcessor. However, when requesting an action path,
>I consistently get a NullPointerException.
>
>Indeed, KUDOS to Chuck. It has helped me very much. Can't wait till my
>copy arrives either :-)
>
>Cheers,
>
>Dylan
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Dylan van Iersel <dy...@van-iersel.org>.
I have just checked out the nightly 1.1b1. It does not include the
TilesPlugin anymore and I remember having read somewhere that the
TilesPlugin is to be used in Struts 1.0. I remember that for 1.1b1 one
should use TilesRequestProcessor. However, when requesting an action path,
I consistently get a NullPointerException.

Indeed, KUDOS to Chuck. It has helped me very much. Can't wait till my
copy arrives either :-)

Cheers,

Dylan

Eddie Bush said:
>   <plug-in className="org.apache.struts.tiles.TilesPlugin">
>     <!-- This represents my config - you could also have
> /WEB-INF/anyfile.xml -->
>     <!-- You may include *multiple* config files by seperating them with
>
> commas! -->
>     <!-- Ex:  value="/path/to/file1.xml,/path/to/file2.xml" -->
>     <set-property property='definitions-config'
> value='/WEB-INF/conf/tiles-config.xml'/>
>     <set-property property='definitions-debug'           value='2'/>
> <set-property property='definitions-parser-details'  value='2'/>
> <set-property property='definitions-parser-validate' value='true'/>
>   </plug-in>
>
> I'm using a nightly - things are "on the move" wrt how Tiles functions
> wrt Struts/integration.  I believe this is how you should now include
> Tiles functionality in your struts-config.xml.  Check out Chuck's book
> review on theserverside.com!  You can get much information on this
> process there!  (Kudos to Chuck for an excellent book!  ... can't wait
> til my copy arrives! ;-)

--
Dylan van Iersel
--



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Eddie Bush <ek...@swbell.net>.
  <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <!-- This represents my config - you could also have 
/WEB-INF/anyfile.xml -->
    <!-- You may include *multiple* config files by seperating them with 
commas! -->
    <!-- Ex:  value="/path/to/file1.xml,/path/to/file2.xml" -->
    <set-property property='definitions-config'          
value='/WEB-INF/conf/tiles-config.xml'/>
    <set-property property='definitions-debug'           value='2'/>
    <set-property property='definitions-parser-details'  value='2'/>
    <set-property property='definitions-parser-validate' value='true'/>
  </plug-in>

I'm using a nightly - things are "on the move" wrt how Tiles functions 
wrt Struts/integration.  I believe this is how you should now include 
Tiles functionality in your struts-config.xml.  Check out Chuck's book 
review on theserverside.com!  You can get much information on this 
process there!  (Kudos to Chuck for an excellent book!  ... can't wait 
til my copy arrives! ;-)

HTH,

Eddie

Dylan van Iersel wrote:

>Hi all,
>
>Can anybody tell me how to configure Struts with Tiles. Am I supposed to
>use TilesRequestProcessor and if so how do I point it to the tile
>definitions xml file?
>
>In addition, am I supposed to use the TilesAction as the base class for my
>actions? I am using the DispatchAction and cannot find a corresponding
>TilesDispatchAction. Also, the TilesAction uses the now deprecated
>perform() method.
>
>I've plowed through, I think, all of the available documentation and found
>various examples but cannot determine which one is correct.
>
>"Am I making sense" is the correct question to end this post I think.
>
>Dylan
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tiles configuration with Struts 1.1b1

Posted by Cedric Dumoulin <ce...@apache.org>.
  Hi,

  Using the TilesPlugin is now the way to go with Struts1.1 nightly 
build. The documentation is updated. Please send me any faulty url if 
you find something else !
Check http://jakarta.apache.org/struts/userGuide/dev_tiles.html, and 
also struts-documentation.war which is much accurate.

  Cedric

Dylan van Iersel wrote:

>Hi all,
>
>Can anybody tell me how to configure Struts with Tiles. Am I supposed to
>use TilesRequestProcessor and if so how do I point it to the tile
>definitions xml file?
>
>In addition, am I supposed to use the TilesAction as the base class for my
>actions? I am using the DispatchAction and cannot find a corresponding
>TilesDispatchAction. Also, the TilesAction uses the now deprecated
>perform() method.
>
>I've plowed through, I think, all of the available documentation and found
>various examples but cannot determine which one is correct.
>
>"Am I making sense" is the correct question to end this post I think.
>
>Dylan
>
>
>--
>Dylan van Iersel
>--
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>