Tell me more ×  In this link, I see the following code.
synchronized (_jspx_page_context) {     pageCounter =
(jspexamples.counterBean)
_jspx_page_context.getAttribute("pageCounter",
PageContext.PAGE_SCOPE);     if (pageCounter == null){
pageCounter = new jspexamples.counterBean();
_jspx_page_context.setAttribute("pageCounter", pageCounter,
PageContext.PAGE_SCOPE);  where _jspx_page_context is of type
PageContext. Why is there a synchronization on
_jspx_page_context? Is PageContext threadshared?  share|improve
this question Could you post the actual JSP that generated that
code. PageContext objects are not shared between threads, so the
code snippet doesn't really make sense to me. –  pap Aug 9 '12
at 7:13 It is available here. I have found similar examples in
the tomcat repo as well. –  user1539577 Aug 9 '12 at 7:28 add
comment  1 Answer  It is thread-shared, means more than one
thread may access pagecontext at any time. So, to make sure
thread safety, we have to synchronize operations on pageCo