Evaluating struts tags inside my own custom tags...

A

A. Brinkmann

Hi,

I made a custom tag (extending TagSupport),
which looks like this:

<test:mytag key="foo"/>

And in the implementation of this tag, in doStartTag(),
I do the following:

out.write("<bean:message key=\""+key+"\"/>");

But well, the struts tag is just written in the output,
and not evaluated. In this case, I could just get the
resource in my implementation instead of using the struts
tag, but I want to encapsulate other struts tags in the
same way, and have them evaluated. Is that possible?

Thanks in advance,

A. Brinkmann.
 
C

Chris Smith

A. Brinkmann said:
But well, the struts tag is just written in the output,
and not evaluated. In this case, I could just get the
resource in my implementation instead of using the struts
tag, but I want to encapsulate other struts tags in the
same way, and have them evaluated. Is that possible?

Not in a Java-based tag handler, no. If you're using JSP 2.0, though,
it's quite possible in a tag file.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
A

A. Brinkmann

Not in a Java-based tag handler, no. If you're using JSP
2.0, though, it's quite possible in a tag file.

Thanks! I'm using JSP 2.0, I just didn't know about tag files. I tried it
and it works great.

A. Brinkmann.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top