struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Li Ying <liying.cn.2...@gmail.com>
Subject Re: How to create a costume struts2 tag? any demo?
Date Sat, 09 Oct 2010 14:13:59 GMT
Hi Lai:

Of course you should extend your class from [BaseUI], so you
can inherit the property [theme] in your class.

But also, you should define the attribute [theme] (and all the other
attributes you want to use) in you TLD file,
or the jsp compiler can not recognize it in your jsp.

You can read the tld file of struts2 ([struts-tags.tld]) as a sample.

[struts-tags.tld] can be found in file
[struts2-core-2.2.1.jar/META-INF/struts-tags.tld].


2010/10/9 Mead Lai <laiqinyi@gmail.com>:
> The same error, I have modified the extends class to BaseUI
>
> JasperException: /demo.jsp(14,4) Attribute theme invalid for tag hello
> according to TLD
>
> I ref the ui.CheckBox.java, but confused me. Thanks for your replies,
> All of them inspirit me very much. I will look insight source.
>
> Appreciate you.
>

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


Mime
View raw message