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):

                       <s:url id="cdt007_url" action="/ReportXxxx" >
                           <s:param name="reset" value="%{'1'}" />
                       </s:url>
                       <a href="${cdt007_url}" ><s:text name="rp.Xxxx" /></a>

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

                       <s:url id="liq030_url" value="/ReportLIQ030.do" >
                           <s:param name="reset" value="%{'1'}" />
                       </s:url>
                       <a href="${liq030_url}" ><s:text name="rp.LIQ030" /></a>

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:

         <c:url var="Xxxx_url" value="reports/ReportXxxx.action" >
             <c:param name="reportId" value="Xxxx" />
         </c:url>
<li><a href="${Xxxx_url}" target="_top"> <bean:message key="rp.Xxxx" bundle="menu" /></a></li> calling S1 usign S1 tags:

<li><html:link action="ReportXxxx?reset=1" target="main"><bean:message key="rp.Xxxx"
                           bundle="menu" /></html:link></li>

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 &lt;a href&gt;, 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]

Reply via email to