aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Can a Custom tag file considered as a View ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Can a Custom tag file considered as a View ?" Watch "Can a Custom tag file considered as a View ?" New topic
Author

Can a Custom tag file considered as a View ?

Harish Moolchandani
Greenhorn

Joined: Mar 12, 2010
Posts: 23
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

Joined: Jun 25, 2001
Posts: 16305
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can a Custom tag file considered as a View ?