You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by 怪侠 <87...@qq.com> on 2011/12/30 08:04:47 UTC

How can I write a custom tag?

Because the common tag are not enough for my application, I want to make some custom tag, like <s:myownaction />. Could anyone tell me the step? Or give me a link?

Re: How can I write a custom tag?

Posted by Jeffrey Black <je...@gmail.com>.
Are you using Struts 2?

JB
On Dec 30, 2011 2:17 AM, "Alex Choi" <ay...@gmail.com> wrote:
>
> Yes you can define a  custom JSP tag by using Java Tag Library Definition
> or TLD and your own  Tag Handler Java  code.
>
> Here's a link to help you to get started,
>
> http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html
>
> As rabbitwkx pointed out, there's lots of info available on the Internet
to
> help you.
>
> Hope this helps.
>  On Dec 29, 2011 11:15 PM, "王科选" <ra...@gmail.com> wrote:
>
> > On 12/30/2011 3:04 PM, 怪侠 wrote:
> >
> >> Because the common tag are not enough for my application, I want to
make
> >> some custom tag, like<s:myownaction />. Could anyone tell me the step?
Or
> >> give me a link?
> >>
> > I think you can define custom tag in jsp , search with google and you
will
> > find a lot result.
> >
> >
------------------------------**------------------------------**---------
> > To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<
user-unsubscribe@struts.apache.org>
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >

Re: How can I write a custom tag?

Posted by Jeffrey Black <je...@gmail.com>.
You can create components with Struts 2.

JB
On Dec 30, 2011 2:17 AM, "Alex Choi" <ay...@gmail.com> wrote:

> Yes you can define a  custom JSP tag by using Java Tag Library Definition
> or TLD and your own  Tag Handler Java  code.
>
> Here's a link to help you to get started,
>
> http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html
>
> As rabbitwkx pointed out, there's lots of info available on the Internet to
> help you.
>
> Hope this helps.
>  On Dec 29, 2011 11:15 PM, "王科选" <ra...@gmail.com> wrote:
>
> > On 12/30/2011 3:04 PM, 怪侠 wrote:
> >
> >> Because the common tag are not enough for my application, I want to make
> >> some custom tag, like<s:myownaction />. Could anyone tell me the step?
> Or
> >> give me a link?
> >>
> > I think you can define custom tag in jsp , search with google and you
> will
> > find a lot result.
> >
> > ------------------------------**------------------------------**---------
> > To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<
> user-unsubscribe@struts.apache.org>
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: How can I write a custom tag?

Posted by Alex Choi <ay...@gmail.com>.
Yes you can define a  custom JSP tag by using Java Tag Library Definition
or TLD and your own  Tag Handler Java  code.

Here's a link to help you to get started,

http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html

As rabbitwkx pointed out, there's lots of info available on the Internet to
help you.

Hope this helps.
 On Dec 29, 2011 11:15 PM, "王科选" <ra...@gmail.com> wrote:

> On 12/30/2011 3:04 PM, 怪侠 wrote:
>
>> Because the common tag are not enough for my application, I want to make
>> some custom tag, like<s:myownaction />. Could anyone tell me the step? Or
>> give me a link?
>>
> I think you can define custom tag in jsp , search with google and you will
> find a lot result.
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@struts.**apache.org<us...@struts.apache.org>
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How can I write a custom tag?

Posted by 王科选 <ra...@gmail.com>.
On 12/30/2011 3:04 PM, 怪侠 wrote:
> Because the common tag are not enough for my application, I want to make some custom tag, like<s:myownaction />. Could anyone tell me the step? Or give me a link?
I think you can define custom tag in jsp , search with google and you 
will find a lot result.

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