Hi,

here are some comments to the answers of Eduardo Pelegri-Llopart. Somehow
user defined tags are not discussed on this list.


1. What is the return value of the methods doStartTag(), doEndTag()
   respectively doAfterBody() in the support classes TagSupport and
   BodyTagSupport?

   The values you mention in your mail are not documented. The orion
   application server behaves as follows:
   TagSupport:
     doStartTag()  returns EVAL_BODY_INCLUDE (and not SKIP_PAGE)
     doEndTag()    returns EVAL_PAGE

2. How do the implementations of doEndTag() differ in the classes
   TagSupport and BodyTagSupport?

   It seems odd that BodyTagSupport overrides doEndTag but does not
   override doStartTag. Since these classes will be subclassed by
   users, overriding doEndTag() by super.doEndTag() is even more odd.

3. Is it possible to use the method getPreviousOut() of class
   BodyTagSupport in the implementation of the methods doStartTag() or
   doEndTag() in subclasses of BodyTagSupport? Or can these methods
   only use pageContext.getOut()?

   Using getPreviousOut() seems logical. Appartently the orion server
   reports an error when doing so.

4. Why does the method doInitBody() in class BodyTagSupport not
   include the clause throws JspError?

   Bug in PR2, ok

5. What happend to the method public PageContext getPageContext() in
   class Tag? Why was it deleted?

   Providing pageContext as a protected field doesn't seem to be
   consistent with the other J2EE APIs. There only very few protected
   fields in these classes. Why did you choose pageContext as one of
   them? Why is it safer?

6. What happened to the method public java.lang.String getTagName() in
   class Tag? Why was it deleted?

   I used it only for error reporting (as you mentioned). I found it
   usefull, because introducing the tag name in the tag handler class
   makes it harder to change tag names (it is redundant). Also if you
   subclass tag handlers error reporting using getTagName() was easy.


Thanks for answering my questions! :-)




volker turau
FH Wiesbaden Fachbereich Informatik
Tel.: +49-611-9495-205 FAX +49-611-9495-210
http://www.informatik.fh-wiesbaden.de/~turau

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to