This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes Is pageContext.setAttribute() Thread-safe? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » JSP
Bookmark "Is pageContext.setAttribute() Thread-safe?" Watch "Is pageContext.setAttribute() Thread-safe?" New topic

Is pageContext.setAttribute() Thread-safe?

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
Is setting page scope attribute thru pageContext.setAttribute() a thread-safe operation?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Unless you write code that spawns it's own threads, yes.
PageContext only exists within the scope of a single request.

Look at JSP.1.8.2 in the JSP spec (link in my signature).
[ February 10, 2006: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63208

Moved to the JSP forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Is pageContext.setAttribute() Thread-safe?
It's not a secret anymore!