开发者

What is a JSP tag?

I'm coming from开发者_开发技巧 a .NET background and trying to learn Java. I keep seeing references to tags and tag handlers, etc.

Is there an equivalent .NET construct?


Yes. <% ... %> is what you get for the jsp tag. Tag Handlers are similar to the RUNAT="SERVER" attribute you can add to many HTML tags, except they go much further and allow you to create custom tags to fit your needs. For example you could create a tag called DATETIMEHERE that when encountered simply output the date/time.

E.g.

<span class="somsCSSClass"><DATETIMEHERE /></span>

In ASP.NET MVC you could create a custom ViewEngine and do something as robust as Tag Handlers very easily.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜