posted 16 years ago
given
public class MyTagHandler extends TagSupport
{
public int doStartTag()
{
// insert code here
// return an int
}
// more code here
......
}
there is single attribute foo in the session scope
which three code fragments inserted independently at line 5 ,
return the value of the attributes ( choose three )
1. Object o = pageContext.getAttribute(" foo");
2. Object o =pagecontext.findAttribute("foo");
3. Object o =pagecontext.getAttribute("foo , PageContext.SESSION_SCOPE);
4. httpsession = pagecontext.getSession();
Object o =s.getAttribute("foo");
5.HttpServletRequest r = pageContext.getREquest();
Object o = r.getAttribute("foo");
my answer 2,3 , ?
hi ranchers
what is right answer