Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in Custom tag developement

 
Lakshmi Sampangi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have confusion regarding the Custom tags Developement.When can i get the output on JSP to the console?

Example:
My JSP has <C:tagName att1="dhjdkh">
<%= hello%>
<% (2+3) %>
</C:tagName>

And Suppose i have defind evrty thing in th e DD to support the above tag.
<body Content>JSP<>
And by class is extending the TagSupport
i have doStrtTag returning EVAL_BODY_INCLUDE
i have doAfterBody JSPWriter object.
pageCotext.getJSPWriter.getOut("ddhjfkhd");

Will by JSP prints the body contents on the console?
What will happend to the data in the doAfterBody()? Is there any way we can show the contents of doAfterBody() to the console?

the above is not Exact syntax.

Thanks in Advance.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want something from the JSP to be purged into the console, you could use logging tools to do it. Printing stuff onto the console with System.out is vendor dependant, so if you use a logger like log4j, you should be able to print stuff to the console.
 
Lakshmi Sampangi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i am asking is can we get anything in the doAfterBody method to the console?

Thanks & Regards,
LakshmIS.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What i am asking is can we get anything in the doAfterBody method to the console?


I am not sure what that means. Are you asking " Can we print whatever was in the body of the tag to the console ?". Yes that can be dont with a seperate writer or a logger perhaps. Or are you asking " Can we print the code in the doAfterBody method to the console ?". That cannot be done. I need to know what you mean by "anything in the doAfterBody method".
 
Senthil Kumar
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am suspecting you cannot have scriplets inside a custom tag
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic