Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Can a Custom tag file considered as a View ?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 24879
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic