• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification needed on thread safety and web.xml

 
kavitha Partha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I'm preparing for SCWCD 5. I�m little confused on couple of concepts and need some clarification. SO here it goes�

1)Is it fare to assume that whether its a Single threaded Model or Multi threaded model local variables are the safest and no other attributes are thread safe( request or session or context attributes) ?

2)In the web.xml , does the elements within the web-app need to be in a specific order ? For example Can error-page element appear before servlet element ? Also within the servlet element, can servlet-class appear before a servlet-name element? My understanding is that the order of the elements shouldn�t matter . Can anyone please confirm that ?

Thanks
Kavitha
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
local variables are the safest

Yes.

My understanding is that the order of the elements shouldn�t matter.

From Servlets 2.4, that's right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic