• Post Reply Bookmark Topic Watch Topic
  • New Topic

TagExtraInfo  RSS feed

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I cannot figure out something:

Suppose I call this from within the doStartTag() of MyTagHandler (name is an attribute in this class):



Then in the JSP file I have this expression:



My question is: Why do we need the TEI class at all in order to execute the



???

The first line



is equivalent to:



i.e. they both create an instance of test.bean.Company and attach it to the current pageContext.

But when we write



We do not use any TEI class......

I hope my question is clear.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't.
If the only reason you're coding the tag is to create a scripting variable, then you could get the same results with useBean.

If you're tag is doing other things AND needs to create scripting variables as part of the process then you would use TagExtraInfo.

These days, with MVC, JSTL, and EL, there should be no need for scriptlets or scripting variables anyway.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!