Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

PageContext trick not working  RSS feed

 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to get a attribute from servlet in tagclass but getting
null pointer exception.

here the codes




I tried all these:
1)context.getAttrubute("listItems",1);
2)context.findAttribute("listItems");
3)context.getRequest().getAttribute("listItems");

above all returns null , please solve my problem

note:the tag class extends SimpleTagSupport and tld is declared fine.

best regards,
omi
 
Bobby Sharma
Ranch Hand
Posts: 598
3
Google App Engine jQuery Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the above problem.The servlet was not executing because
I was not using the corresponding jsp.

So the conclusion is we have to use corresponding jsp which is related to
the servlet from which we request attribute.

best regards,
omi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!