Re: Using global forwards to tile definitions?

2002-09-10 Thread Dylan van Iersel

On Tue, 2002-09-10 at 19:33, Cedric Dumoulin wrote:

  Yes, the problem comes from  . It is not a bug: Tiles 
definitions name are logical names, not URLs.  require a real 
URL to work because its result is interpreted on the server side.


The tag is processed on the server side but the actual result is an URL
which get sent back to the client within the HTML. That leads me to
think that the tag can generate a 'normal' URL from a symbolic name
perfectly well. 


   Cedric

[EMAIL PROTECTED] wrote:

>Well, that does help.  I can stop banging my head against the desk
>now...
>
>In the struts book online it covers this...
>
>extends="storefront.default">
>
>
>  
>
>
>
>
>
>
>
>
>
>So this is a problem in the HTML:Link forward code?  Is it intentional? 
>Is it something I can look at fixing?
>
>Thanks for the answer!
>
>
>
>
>-Original Message-
>From: cedric [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, September 10, 2002 12:24 PM
>To: struts-user
>Subject: Re: Using global forwards to tile definitions?
>
>
>
>  The  tag can't be used with a Tiles name as path. You need 
>to use an intermediate action. An often used solution is to have an 
>action taking a definition name as http parameter, like the tiles 
>DefinitionDispatcherAction. This action should check if the provided 
>definition name is allowed, otherwise it is possible to access all your 
>definitions.
>  Your global forward could now look like:
>
>   path="path.to.dispatcheraction.do?def=plantsec.index"/>
>
>  Hope this help,
> Cedric
>
>[EMAIL PROTECTED] wrote:
>
>  
>
>>I'm going back and trying to implement some "best practices" that I
>>skipped over in the beginning.  One of which is to use global forwards
>>alot.   
>>
>>Say I have some global forwards that look like this:
>>
>>
>>  
>>  
>>  
>>
>>
>>And in my JSP pages I use:
>>
>>Contact Us
>>
>>I can see the benefit that gives me.
>>
>>But if I have a tiles definition for the plantsec.faq it does not seem
>>to want to run that.  Am I doing something wrong or do I need to use an
>>action for every one of those?  That is the only way I can seem to make
>>it work...
>>
>>Any help is appreciated
>>
>>
>>
>>
>>
>>
>>William B Chmura
>>Internet Services Admin / IT Department 
>>Ensign-Bickford Industries, Inc and subsidiaries
>>
>>Tel: 860.843.1542
>>660 Hopmeadow Street
>>Simsbury, CT  06070
>>
>>http://www.e-bind.com
>>http://www.e-bco.com
>>http://www.e-brealty.com
>>http://www.eba-d.com
>>http://www.applied-food.com
    >>
>>
>>
>>
>> 
>>
>>
>>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>
>  
>



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


Groeten, 

Dylan 

 
Dylan van Iersel 
E-mail:   [EMAIL PROTECTED]
Web: http://www.van-iersel.org
ICQ#:46244248 
 




Re: [Announce] [New Extension] ApplicationResources.properties fromDatabase

2002-09-10 Thread Dylan van Iersel

Cool!! This was something I was planning on doing myself but didn't find
the time for it. I was thinking we can put the tiles definitions,
templates, layouts whatever in a database as well and have it
dynamically changed, on the fly as were. 

On Tue, 2002-09-10 at 21:05, James Mitchell wrote:

For anyone interested, I have finished implementing DBMessageResources
which allows you to keep the key-value pairs (from your
ApplicationResources.properties) in a single database table.

You can load your property files into a table (generic schema is provided)
and with this extension, by only modifying  in the
struts-config.xml your application will run WITHOUT ANY code changes. (See
the readme.txt file included)

This extension uses OJB (http://jakarta.apache.org/ojb) O/R mapping for
database configuration and connection pool management.

I have included a modified version of the (1.1b2) struts-example to
demonstrate.

I have tested this with Struts 1.1b2, and I'm sure it will work with 1.1b1
(If anyone requires a 1.0.x compatible, I can look at that also)

I will get this project available as soon as I work through some cvs issues
on sf.net:

If anyone is REALLY itching to get their hands on it sooner, send me a
email.

For those who were waiting, thanks for your patience.


James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta


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


Groeten, 

Dylan 

------------ 
Dylan van Iersel 
E-mail:   [EMAIL PROTECTED]
Web: http://www.van-iersel.org
ICQ#:46244248 
 




Re: Tiles configuration with Struts 1.1b1

2002-07-30 Thread Dylan van Iersel


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:   
For additional commands, e-mail: 




Re: Tiles configuration with Struts 1.1b1

2002-07-29 Thread Dylan van Iersel

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 ... 
>
> 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:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>



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

Groeten,

Dylan

---
Dylan van Iersel
Email:  [EMAIL PROTECTED]
Web:www.van-iersel.org
ICQ#:   46244248
---

-
---


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




Re: Tiles configuration with Struts 1.1b1

2002-07-29 Thread Dylan van Iersel


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:
>   
> 
> 
> 
>  value='/WEB-INF/conf/tiles-config.xml'/>
> 
> 
> 
>   
>
> 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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Tiles configuration with Struts 1.1b1

2002-07-29 Thread Dylan van Iersel


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:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




TilesRequestProcessor configuration (struts 1.1b1)

2002-07-28 Thread Dylan van Iersel


Hi all,

Does anybody know how to pass the TilesRequestProcessor the info on where
to find the tile definitions?

--
Dylan
--



--
To unsubscribe, e-mail:   
For additional commands, e-mail: