• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Page Context from a servlet

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

Let's imagine I have a servlet that will dispatch to a jsp page. Ignoring for the moment whether or not it would even make any sense, is it possible for this servlet to stuff an attribute into the PAGE CONTEXT of the dispatched-to jsp? (By page context, I mean that which is represented by the implicit object pageContext within a scriptlet on the jsp page (I know I know, well-behaved web developers never write scriptlets, I know).)

Th´┐Żnks in advance,
John
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, page context is for single JSPs only; servlets don't have access to that. The request context would be right for sharing objects in this case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic