• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is JSPFragment

 
Ravi Singh
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to know about JSPFragment which is being passed to setJspBody() in
SimpleTag
 
Gopikrishna Kunisetty
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JspFragment is an object. It encapsulates the body of a tag,that is invoked. Most of the time it is used to output the body content of tag to response. The content of JspFragment are not accessible directly.
 
John Pearson
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to the previous reply, it's important to note that a JspFragment must not contain scriptlets or scriptlet expressions. For more complete information on JspFragment, check out Sun's Servlet API docs.
 
Kunal Jag
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe a common point of confusion among many exam aspirants is the difference between "JSP Segments" and "JSP Fragments". JSP Segments are incomplete code segments that are designed to be included in other files. JSP Fragments, on the other hand are the classes that implement the javax.servlet.jsp.tagext.JspFragment interface. This interface is a part of the tag extension API.


Regards,
[ June 12, 2008: Message edited by: Kunal Jag ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic