tags:

views:

61

answers:

1

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?

+2  A: 

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.

Nissan Fan
So equivalent to a ASP.net Server Control
Jeff Martin
Not necessarily. Think of Tag Handlers as things that trigger code behind like RUNAT="Server" and jsp tags as enclosures for in-page code.
Nissan Fan