aspose file tools
The moose likes JSP and the fly likes Attribute does not exist when you invoke tag(pg 509 HFSJ) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Attribute does not exist when you invoke tag(pg 509 HFSJ)" Watch "Attribute does not exist when you invoke tag(pg 509 HFSJ)" New topic
Author

Attribute does not exist when you invoke tag(pg 509 HFSJ)

Vijay Bharghav bheemineni
Greenhorn

Joined: Aug 31, 2005
Posts: 29
Hi All,

JSP Tag Invocation

<myTags: Simple3>
Message is : ${message}
<myTags: Simlpe3>

Tag Handler

public void doTag() throws JspException,IOException
{
getJspContext().setAttribute("message","wear sunscreen.");
getJspBody().invoke("null");
}

My doubt is we will be writing the tag handler first and then we will be invoking the tag,then how can we set an attribute "message" because at this point we don't know which attribute(in this case ${message} will be used in the tag invocation .

If I am correct does this mean that container will be adding the line
"getJspContext().setAttribute("message","wear sunscreen.");"

Could any one please explain this?
Sorry if my questions sounds silly but I am new to JSTL & JSP's.

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Attribute does not exist when you invoke tag(pg 509 HFSJ)
 
Similar Threads
SkipPageException problm
Setting bean in Simple tag attribute
getJspContext's setAttribute problem?
Doubt in HFSJ..pg 511 creating simple tag with attribute
Simple Tag with Attribute