Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to pass java Object from jsp to TagLibrary  RSS feed

 
Suresh Sankar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to jsp and Tags. I have to do related to tag. By passing the java object which can be any string or query from databse to tag Library from JSP and this tag library should itself handle the UI part also and display us the result set without using our JSP again.
ALso please help in writing the Tld .
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So where's your code? What problems are you having with it?
 
Pallavi Siddappareddy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public class SimpleTag extends TagSupport
{
private String querstring=null;

public int doStartTag() throws JSPException
{
try
{
pageContext.getOut.print("Inside doStartTag() method");
}catch(Exception ex){
throw new JSPTagException("Simple Tag" +ex.getMessage());
}
return SKIP_BODY;
}

public int doEndTag(){
return EVAL_PAGE
}

}

this is my tag handler . i wnat to know how to apss the java object from jsp to tag library and how the tag library will display it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!