This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about taglib directive

 
champ sharma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)I m a bit confused about this fact..that ''to update data in thread safe manner ,it should be stored in ServletContext obj.!!''..but i read that it should be in SrevletContext are not thread safe ..but ServletRequest obj are.

2)can reserved words be used as prefix in taglib directive??

can anyone explain
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reserved words like : java , javax, sun, sunw, jsp,jspx, servlet cannot be used as prefix. Also one should avoid using them for parameter names.

It is not thread safe to store objects in ServletContext or application scope. Only thread safe objects are local variables and Request Objects.


Regards,
Shivani
 
mo sayed
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.) ServletContext object has an application wide scope. This means that
all servlets for a given application can see this object and access it's
data members. Therefore a situation could arise, where two distinct requests serviced by the same or different servlets could change the value of a specific parameter held within the ServiceContext object. This problem can be overcome by synchronizing on the ServletContext object within the servlet code.

regards,
Mo
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can delete posts by editing them - there's a checkbox named "Delete this post" or something similar. Check that, submit the form, and -poof!- the post is gone.
 
champ sharma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic