File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes jsp tagdependent custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp tagdependent custom tag " Watch "jsp tagdependent custom tag " New topic

jsp tagdependent custom tag

Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 138
I have a Bodytagsupport subclassed class with the following :
public int doAfterBody() throws JspException {

JspWriter out = getPreviousOut();
BodyContent bodyContent = getBodyContent();
String thisbody=bodyContent.getString();

catch(Exception e) {

return SKIP_BODY;
Here param is an attribute of the tag;which is to be appended to the tag body-simple,isnt it?
the JSP content is :
<table border=1 cellspacing=0 cellpadding=2>
<sample:echotag param="IBM">
<tr><td> ${firstname} </td></tr>

In the resulting html i get IBm printed before ${firstname},why?
Ranadhir Nag
Ranch Hand

Joined: Mar 09, 2006
Posts: 138
The dostarttag is as follows:
public int doStartTag() throws JspException {
try {
JspWriter out = pageContext.getOut();

} catch (Exception e) {

I agree. Here's the link:
subject: jsp tagdependent custom tag
It's not a secret anymore!