Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-28 Thread Ted Husted

On 3/27/07, Greg Reddin <[EMAIL PROTECTED]> wrote:

If I had to guess I would say that the problems are mostly due to the fact
that Struts 2 does not have support for Tiles 1.


Not directly, but people were using Tiles 1 with WebWork 2 before
Tiles 2 existed.

* http://raibledesigns.com/rd/entry/how_to_use_tiles_with

I expect the same technique Matt used with T1 and WW2 could be used to
use T1 with S2.

HTH, Ted


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



Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-28 Thread Ray Clough
I use S1 with T1 using the standard tiles-defs.xml definition file.  I use S2 
with T2 using tiles.xml file.  It is true that if your jsp pages include the 
Tiles tags, then you would need probably need separate versions for T1 and T2.  
I generally only use Tiles in the Template file, and I do have 2 of them.  That 
is a very simple file, though, and duplicating it is easy.  If I feel the need 
for Tiles tags in the component jsp's, then I'd have to duplicate them also, 
which would definitely be a pain. 

Calling S1 actions from S2 or S2 from S1 just requires putting ".do" after the 
action (from S2) or ".action" (from S1).  I typically use the S2 tags in my new 
pages, and they work OK called from S1 actions.  I mostly use links, rather than 
buttons.  I have found that some fudging is necessary:


calling S2 action using S2 tags (use 'action' attribute):

   
   
   
   

calling S1 action using S2 tags (use 'value' attribute)

   
   
   
   

I have also used the jstl core tags for the url, but you need to put the suffix 
after the url.


calling S2 from S1, using S1 and jstl tags:

 
 
 
  key="rp.Xxxx" bundle="menu" />
   
calling S1 usign S1 tags:


 key="rp.Xxxx"

   bundle="menu" />

I hope this helps.

- Ray Clough
[EMAIL PROTECTED]



doktora wrote:

Ray,

Which definition files specifically do you need to be split?

One of the biggest problems I had (which I couldn't figure out) was mixing
jsps with T1 and T2. At compile time, all my JSPs wanted to be either
T1-compliant, or T2-compliant.

Even if I had figured this out, there is still a big problem because you
can't migrate some actions to S2 without duplicating jsps to be in T2 mode
because S1 actoins and S2 actions may be using those jsps simultaneously.
Which means a messy migration with a lot of (jsp) code replication.

I still stand firm -- until there is S1->T2 compatibility, migrating from
S1->S2 will be a nightmare, if Tiles are involved.

I also suspect that calling S2 actions from S1 would have to be hard-wired
with , as opposed to using html:link. Is that so?

doktora


Ray Clough wrote:
  
It definitely IS possible to comingle a S1 app using Tiles1 and an S2 
app using Tiles2 in the same WAR file.  But they have separate 
definition files.  You can call a S1 action from an S2 page and vice 
versa.  I know it is possible, because I'm doing it.  I believe that it 
is NOT possible to use S1 with T2 or S2 with T1 - at least not out of 
the box.


Ray Clough



Greg Reddin wrote:


On 3/27/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
  

Your saying that any S1 app using Tiles can't, based on your experience,
be run with part of it being S2-based, in the same WAR?  Could you
describe more what the problems you encountered were?

If I had to guess I would say that the problems are mostly due to the 
fact
that Struts 2 does not have support for Tiles 1.  So you'll have to 
migrate

to Tiles 2 at the same time.  I can't imagine there being huge
incompatibilities between Tiles 1 and 2 that would keep them from running
together in the same app, but it's certainly possible.  The biggest 
struggle

would likely be the taglib API differences between Tiles 1 and 2.

Greg

  

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



Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-28 Thread doktora

Ray,

Which definition files specifically do you need to be split?

One of the biggest problems I had (which I couldn't figure out) was mixing
jsps with T1 and T2. At compile time, all my JSPs wanted to be either
T1-compliant, or T2-compliant.

Even if I had figured this out, there is still a big problem because you
can't migrate some actions to S2 without duplicating jsps to be in T2 mode
because S1 actoins and S2 actions may be using those jsps simultaneously.
Which means a messy migration with a lot of (jsp) code replication.

I still stand firm -- until there is S1->T2 compatibility, migrating from
S1->S2 will be a nightmare, if Tiles are involved.

I also suspect that calling S2 actions from S1 would have to be hard-wired
with  , as opposed to using html:link. Is that so?

doktora


Ray Clough wrote:
> 
> It definitely IS possible to comingle a S1 app using Tiles1 and an S2 
> app using Tiles2 in the same WAR file.  But they have separate 
> definition files.  You can call a S1 action from an S2 page and vice 
> versa.  I know it is possible, because I'm doing it.  I believe that it 
> is NOT possible to use S1 with T2 or S2 with T1 - at least not out of 
> the box.
> 
> Ray Clough
> 
> 
> 
> Greg Reddin wrote:
>> On 3/27/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>>>
>>> Your saying that any S1 app using Tiles can't, based on your experience,
>>> be run with part of it being S2-based, in the same WAR?  Could you
>>> describe more what the problems you encountered were?
>>
>>
>> If I had to guess I would say that the problems are mostly due to the 
>> fact
>> that Struts 2 does not have support for Tiles 1.  So you'll have to 
>> migrate
>> to Tiles 2 at the same time.  I can't imagine there being huge
>> incompatibilities between Tiles 1 and 2 that would keep them from running
>> together in the same app, but it's certainly possible.  The biggest 
>> struggle
>> would likely be the taglib API differences between Tiles 1 and 2.
>>
>> Greg
>>
> 
> ---------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts2-and-Struts1-comingling-w--Tiles-tf3474341.html#a9718430
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Greg Reddin

On 3/27/07, Ray Clough <[EMAIL PROTECTED]> wrote:


I believe that it is NOT possible to use S1 with T2 or S2 with T1 - at
least not out of
the box.



I know Antonio has worked on T2 support for S1, but I don't think it's quite
ready yet

Greg


Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Ray Clough
It definitely IS possible to comingle a S1 app using Tiles1 and an S2 
app using Tiles2 in the same WAR file.  But they have separate 
definition files.  You can call a S1 action from an S2 page and vice 
versa.  I know it is possible, because I'm doing it.  I believe that it 
is NOT possible to use S1 with T2 or S2 with T1 - at least not out of 
the box.


Ray Clough



Greg Reddin wrote:

On 3/27/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:


Your saying that any S1 app using Tiles can't, based on your experience,
be run with part of it being S2-based, in the same WAR?  Could you
describe more what the problems you encountered were?



If I had to guess I would say that the problems are mostly due to the 
fact
that Struts 2 does not have support for Tiles 1.  So you'll have to 
migrate

to Tiles 2 at the same time.  I can't imagine there being huge
incompatibilities between Tiles 1 and 2 that would keep them from running
together in the same app, but it's certainly possible.  The biggest 
struggle

would likely be the taglib API differences between Tiles 1 and 2.

Greg



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



Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Greg Reddin

On 3/27/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:


Your saying that any S1 app using Tiles can't, based on your experience,
be run with part of it being S2-based, in the same WAR?  Could you
describe more what the problems you encountered were?



If I had to guess I would say that the problems are mostly due to the fact
that Struts 2 does not have support for Tiles 1.  So you'll have to migrate
to Tiles 2 at the same time.  I can't imagine there being huge
incompatibilities between Tiles 1 and 2 that would keep them from running
together in the same app, but it's certainly possible.  The biggest struggle
would likely be the taglib API differences between Tiles 1 and 2.

Greg


Re: Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread Frank W. Zammetti
Your saying that any S1 app using Tiles can't, based on your experience, 
be run with part of it being S2-based, in the same WAR?  Could you 
describe more what the problems you encountered were?  I was considering 
doing this for one app I have, the only one I've ever used Tiles in 
actually, and it would be really nice to know what you found, since I 
don't think it's an especially unique or special thing to think about doing.


Frank

doktora wrote:

I just wanted to inform anyone out there that may be thinking of migrating to
Struts2 in a gradual way -- by having both S1 and S2 in the same war -- do
not try this at home, if you are using Tiles.

It is a futile excercise which cost me 24 man-hours.

The best approach would be to do a complete port of your app to S2 and T2!


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

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



Struts2 and Struts1 comingling w/ Tiles

2007-03-27 Thread doktora

I just wanted to inform anyone out there that may be thinking of migrating to
Struts2 in a gradual way -- by having both S1 and S2 in the same war -- do
not try this at home, if you are using Tiles.

It is a futile excercise which cost me 24 man-hours.

The best approach would be to do a complete port of your app to S2 and T2!
-- 
View this message in context: 
http://www.nabble.com/Struts2-and-Struts1-comingling-w--Tiles-tf3474341.html#a9696650
Sent from the Struts - User mailing list archive at Nabble.com.


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