You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Henry Jen <he...@ztune.net> on 2009/12/02 08:00:27 UTC

Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Hi,

I updated our project using 2.1.6 to 2.1.8.1 and surprised to find
that <s:a> tag breaks the application.

An example is
<s:a href="#" tabindex="3">Login</s:a>
renders to in 2.1.8.1
<a tabindex="3" href="#"/>

When I looked into the simple template, seems like the change in a.ftl
and a-close.ftl is causing this.

In 2.1.8, the a.ftl basically moved into a-close.ftl and using
${parameters.body} in between.

>${parameters.body}</a>

I don't believe this is a bug as it is obvious, does this mean the
usage of <s:a> changed?

FWIW, I am using struts in a maven project, so dependencies is
retrieved by maven.

Cheers,
Henry

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Saeed Iqbal <sa...@gmail.com>.
Yes thats right

On Wednesday, December 2, 2009, Brian Thompson <el...@gmail.com> wrote:
> <a href="<s:property value="%{#some_var_s:url}">Link</a>
>
> -Brian
>
> On Wed, Dec 2, 2009 at 1:40 AM, Henry Jen <he...@ztune.net> wrote:
>
>> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
>> > It totally depends on your needs.
>> >
>>
>> The only reason we would like to use <s:a> is that we want to use OGNL
>> in href. For example,
>>
>> <s:a href="%{#some_var_s:url}">Link</s:a>
>>
>> If we can use <s:a> would be cleaner. Any suggestion?
>>
>> Cheers,
>> Henry
>>
>> > On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:
>> >
>> >> 2009/12/1 Henry Jen <he...@ztune.net>:
>> >> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
>> >> > say that, though It does say it works with simple theme but works best
>> >> > for ajax.
>> >> >
>> >> > 2.1.6 works, so I am wondering if there is a quick way to make it work
>> >> > for 2.1.8.
>> >> >
>> >>
>> >> Maybe the right approach is simply use <a> rather than <s:a>?
>> >>
>> >> Cheers,
>> >> Henry
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Saeed Iqbal
>> > Independant Consultant (Freelance)
>> > Struts - J2EE - Application Architect / Developer
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

-- 
Saeed Iqbal
Independant Consultant (Freelance)
J2EE - Application Architect / Developer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Brian Thompson <el...@gmail.com>.
Oops, that should have been this:

<a href="<s:property value="%{#some_var_s:url}"/>">Link</a>

Closing the tag is always a good idea.

-Brian



On Wed, Dec 2, 2009 at 9:11 AM, Brian Thompson <el...@gmail.com>wrote:

> <a href="<s:property value="%{#some_var_s:url}">Link</a>
>
> -Brian
>
>
> On Wed, Dec 2, 2009 at 1:40 AM, Henry Jen <he...@ztune.net> wrote:
>
>> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
>> > It totally depends on your needs.
>> >
>>
>> The only reason we would like to use <s:a> is that we want to use OGNL
>> in href. For example,
>>
>> <s:a href="%{#some_var_s:url}">Link</s:a>
>>
>> If we can use <s:a> would be cleaner. Any suggestion?
>>
>> Cheers,
>> Henry
>>
>> > On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:
>> >
>> >> 2009/12/1 Henry Jen <he...@ztune.net>:
>> >> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
>> >> > say that, though It does say it works with simple theme but works
>> best
>> >> > for ajax.
>> >> >
>> >> > 2.1.6 works, so I am wondering if there is a quick way to make it
>> work
>> >> > for 2.1.8.
>> >> >
>> >>
>> >> Maybe the right approach is simply use <a> rather than <s:a>?
>> >>
>> >> Cheers,
>> >> Henry
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Saeed Iqbal
>> > Independant Consultant (Freelance)
>> > Struts - J2EE - Application Architect / Developer
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Brian Thompson <el...@gmail.com>.
<a href="<s:property value="%{#some_var_s:url}">Link</a>

-Brian

On Wed, Dec 2, 2009 at 1:40 AM, Henry Jen <he...@ztune.net> wrote:

> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> > It totally depends on your needs.
> >
>
> The only reason we would like to use <s:a> is that we want to use OGNL
> in href. For example,
>
> <s:a href="%{#some_var_s:url}">Link</s:a>
>
> If we can use <s:a> would be cleaner. Any suggestion?
>
> Cheers,
> Henry
>
> > On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:
> >
> >> 2009/12/1 Henry Jen <he...@ztune.net>:
> >> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
> >> > say that, though It does say it works with simple theme but works best
> >> > for ajax.
> >> >
> >> > 2.1.6 works, so I am wondering if there is a quick way to make it work
> >> > for 2.1.8.
> >> >
> >>
> >> Maybe the right approach is simply use <a> rather than <s:a>?
> >>
> >> Cheers,
> >> Henry
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant (Freelance)
> > Struts - J2EE - Application Architect / Developer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Saeed Iqbal <sa...@gmail.com>.
My suggestion, if you are not able to do this then maybe go with s:set and
c:out the href. You would attain the same thing back.

On Wed, Dec 2, 2009 at 1:25 PM, Henry Jen <he...@ztune.net> wrote:

> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> > It totally depends on your needs.
> >
>
> The only reason we would like to use <s:a> is that we want to use OGNL
> in href. For example,
>
> <s:a href="%{#some_var_s:url}">Link</s:a>
>
> If we can use <s:a> would be cleaner. Any suggestion?
>
> Cheers,
> Henry
>
> > On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:
> >
> >> 2009/12/1 Henry Jen <he...@ztune.net>:
> >> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
> >> > say that, though It does say it works with simple theme but works best
> >> > for ajax.
> >> >
> >> > 2.1.6 works, so I am wondering if there is a quick way to make it work
> >> > for 2.1.8.
> >> >
> >>
> >> Maybe the right approach is simply use <a> rather than <s:a>?
> >>
> >> Cheers,
> >> Henry
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant (Freelance)
> > Struts - J2EE - Application Architect / Developer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant (Freelance)
Struts - J2EE - Application Architect / Developer

Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Henry Jen <he...@ztune.net>.
2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> It totally depends on your needs.
>

The only reason we would like to use <s:a> is that we want to use OGNL
in href. For example,

<s:a href="%{#some_var_s:url}">Link</s:a>

If we can use <s:a> would be cleaner. Any suggestion?

Cheers,
Henry

> On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:
>
>> 2009/12/1 Henry Jen <he...@ztune.net>:
>> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
>> > say that, though It does say it works with simple theme but works best
>> > for ajax.
>> >
>> > 2.1.6 works, so I am wondering if there is a quick way to make it work
>> > for 2.1.8.
>> >
>>
>> Maybe the right approach is simply use <a> rather than <s:a>?
>>
>> Cheers,
>> Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> Struts - J2EE - Application Architect / Developer
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Saeed Iqbal <sa...@gmail.com>.
It totally depends on your needs.

On Wed, Dec 2, 2009 at 1:14 PM, Henry Jen <he...@ztune.net> wrote:

> 2009/12/1 Henry Jen <he...@ztune.net>:
> > Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
> > say that, though It does say it works with simple theme but works best
> > for ajax.
> >
> > 2.1.6 works, so I am wondering if there is a quick way to make it work
> > for 2.1.8.
> >
>
> Maybe the right approach is simply use <a> rather than <s:a>?
>
> Cheers,
> Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant (Freelance)
Struts - J2EE - Application Architect / Developer

Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Henry Jen <he...@ztune.net>.
2009/12/1 Henry Jen <he...@ztune.net>:
> Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
> say that, though It does say it works with simple theme but works best
> for ajax.
>
> 2.1.6 works, so I am wondering if there is a quick way to make it work
> for 2.1.8.
>

Maybe the right approach is simply use <a> rather than <s:a>?

Cheers,
Henry

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Henry Jen <he...@ztune.net>.
Thanks for the prompt reply, but document in 2.1.6 and 2.1.8 doesn't
say that, though It does say it works with simple theme but works best
for ajax.

2.1.6 works, so I am wondering if there is a quick way to make it work
for 2.1.8.

Cheers,
Henry

2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> http://struts.apache.org/2.0.8/docs/a.html says
> *THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED*
>
> On Wed, Dec 2, 2009 at 12:57 PM, Henry Jen <he...@ztune.net> wrote:
>
>> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
>> > Is your Ajax configured?
>>
>> Sorry for my ignorance, we don't use ajax with struts, not sure what
>> need to be configured. Would you shed some light for me?
>>
>> Cheers,
>> Henry
>>
>> >
>> > On Wed, Dec 2, 2009 at 12:45 PM, Henry Jen <he...@ztune.net> wrote:
>> >
>> >> Hi,
>> >>
>> >> I updated our project using 2.1.6 to 2.1.8.1 and surprised to find
>> >> that <s:a> tag breaks the application.
>> >>
>> >> An example is
>> >> <s:a href="#" tabindex="3">Login</s:a>
>> >> renders to in 2.1.8.1
>> >> <a tabindex="3" href="#"/>
>> >>
>> >> When I looked into the simple template, seems like the change in a.ftl
>> >> and a-close.ftl is causing this.
>> >>
>> >> In 2.1.8, the a.ftl basically moved into a-close.ftl and using
>> >> ${parameters.body} in between.
>> >>
>> >> >${parameters.body}</a>
>> >>
>> >> I don't believe this is a bug as it is obvious, does this mean the
>> >> usage of <s:a> changed?
>> >>
>> >> FWIW, I am using struts in a maven project, so dependencies is
>> >> retrieved by maven.
>> >>
>> >> Cheers,
>> >> Henry
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Saeed Iqbal
>> > Independant Consultant (Freelance)
>> > Struts - J2EE - Application Architect / Developer
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> Struts - J2EE - Application Architect / Developer
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Saeed Iqbal <sa...@gmail.com>.
http://struts.apache.org/2.0.8/docs/a.html says
*THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED*

On Wed, Dec 2, 2009 at 12:57 PM, Henry Jen <he...@ztune.net> wrote:

> 2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> > Is your Ajax configured?
>
> Sorry for my ignorance, we don't use ajax with struts, not sure what
> need to be configured. Would you shed some light for me?
>
> Cheers,
> Henry
>
> >
> > On Wed, Dec 2, 2009 at 12:45 PM, Henry Jen <he...@ztune.net> wrote:
> >
> >> Hi,
> >>
> >> I updated our project using 2.1.6 to 2.1.8.1 and surprised to find
> >> that <s:a> tag breaks the application.
> >>
> >> An example is
> >> <s:a href="#" tabindex="3">Login</s:a>
> >> renders to in 2.1.8.1
> >> <a tabindex="3" href="#"/>
> >>
> >> When I looked into the simple template, seems like the change in a.ftl
> >> and a-close.ftl is causing this.
> >>
> >> In 2.1.8, the a.ftl basically moved into a-close.ftl and using
> >> ${parameters.body} in between.
> >>
> >> >${parameters.body}</a>
> >>
> >> I don't believe this is a bug as it is obvious, does this mean the
> >> usage of <s:a> changed?
> >>
> >> FWIW, I am using struts in a maven project, so dependencies is
> >> retrieved by maven.
> >>
> >> Cheers,
> >> Henry
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
> > --
> > Saeed Iqbal
> > Independant Consultant (Freelance)
> > Struts - J2EE - Application Architect / Developer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant (Freelance)
Struts - J2EE - Application Architect / Developer

Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Henry Jen <he...@ztune.net>.
2009/12/1 Saeed Iqbal <sa...@gmail.com>:
> Is your Ajax configured?

Sorry for my ignorance, we don't use ajax with struts, not sure what
need to be configured. Would you shed some light for me?

Cheers,
Henry

>
> On Wed, Dec 2, 2009 at 12:45 PM, Henry Jen <he...@ztune.net> wrote:
>
>> Hi,
>>
>> I updated our project using 2.1.6 to 2.1.8.1 and surprised to find
>> that <s:a> tag breaks the application.
>>
>> An example is
>> <s:a href="#" tabindex="3">Login</s:a>
>> renders to in 2.1.8.1
>> <a tabindex="3" href="#"/>
>>
>> When I looked into the simple template, seems like the change in a.ftl
>> and a-close.ftl is causing this.
>>
>> In 2.1.8, the a.ftl basically moved into a-close.ftl and using
>> ${parameters.body} in between.
>>
>> >${parameters.body}</a>
>>
>> I don't believe this is a bug as it is obvious, does this mean the
>> usage of <s:a> changed?
>>
>> FWIW, I am using struts in a maven project, so dependencies is
>> retrieved by maven.
>>
>> Cheers,
>> Henry
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> --
> Saeed Iqbal
> Independant Consultant (Freelance)
> Struts - J2EE - Application Architect / Developer
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Upgrade 2.1.6 to 2.1.8.1, cause empty tag?

Posted by Saeed Iqbal <sa...@gmail.com>.
Is your Ajax configured?

On Wed, Dec 2, 2009 at 12:45 PM, Henry Jen <he...@ztune.net> wrote:

> Hi,
>
> I updated our project using 2.1.6 to 2.1.8.1 and surprised to find
> that <s:a> tag breaks the application.
>
> An example is
> <s:a href="#" tabindex="3">Login</s:a>
> renders to in 2.1.8.1
> <a tabindex="3" href="#"/>
>
> When I looked into the simple template, seems like the change in a.ftl
> and a-close.ftl is causing this.
>
> In 2.1.8, the a.ftl basically moved into a-close.ftl and using
> ${parameters.body} in between.
>
> >${parameters.body}</a>
>
> I don't believe this is a bug as it is obvious, does this mean the
> usage of <s:a> changed?
>
> FWIW, I am using struts in a maven project, so dependencies is
> retrieved by maven.
>
> Cheers,
> Henry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Saeed Iqbal
Independant Consultant (Freelance)
Struts - J2EE - Application Architect / Developer