• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can a Custom tag file considered as a View ?

 
Harish Moolchandani
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recently decided to use custom tag files in my project instead of using <jsp:include>
But now, Location.tag(View) -> LocationServlet(Controller) -> DisplayLocations.jsp(View)

Location.tag sends the request to LocationServlet, so can I consider it as a view or the jsp page which uses this tag is a view (Example: Registration page use this tag, so it will be the view which calls the Controller?)
Same goes for Login.tag
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tags are (more or less) Controllers. A Controller is nothing more nor less than an interface component that is responsible for transferring information between the Model and the View and that's primarily what tags do, although they often have a view-rendering aspect as well.

Don't confuse the Tag implementation with usage of the tag. To use a tag, you code an XML element on the View definition that indicates the tag that is to be used and (generally) the model (sub)component that is bound to it. But the View Definition Language (XML) is not the tag itself.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic