• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about taglib directive

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks guys :-)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic