Custom tags outputting a JSTL tag

2003-05-27 Thread Danilo Luiz Rheinheimer
Hello,

  I have a custom tag, and I want to output a JSTL tag on it.
  But this new tag is not processed.

  Like this :

  public int doStartTag() throws JspException {
try {
  JspWriter out = pageContext.getOut();
  out.println(c:out value=\y\/);
}
catch (IOException ex) {
}
return EVAL_BODY_INCLUDE;
  }
  
  Any help ?
  
-- 
Best regards,
 Danilo  mailto:[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Custom tags outputting a JSTL tag

2003-05-27 Thread Shawn Bayern
On Wed, 28 May 2003, Danilo Luiz Rheinheimer wrote:

   I have a custom tag, and I want to output a JSTL tag on it.
   But this new tag is not processed.
 
   Like this :
 
   public int doStartTag() throws JspException {
 try {
   JspWriter out = pageContext.getOut();
   out.println(c:out value=\y\/);
 }
 catch (IOException ex) {
 }
 return EVAL_BODY_INCLUDE;
   }
   
   Any help ?

This can't easily be done because the JSP container won't interpret your
output as tags.  You could walk through the various steps that the JSP
container performs to invoke c:out -- e.g., instantiate a handler, call
the accessors, call doStartTag(), and so forth -- but that's
extraordinarily tedious.

An easier solution might be to use the RequestDispatcher to include a page
that contains the tag you want to include, parameterized by request
attributes.  This leads to a better design anyway, where output stays the
responsibility of JSP pages.

-- 
Shawn Bayern
JSTL in Action   http://www.manning.com/bayern


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]