• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubts regarding Servlet

 
Radmika Arunachalam
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please verify whether following statements are correct!

1. if a servlet overrides doGet, OPTIONS request to that servlet returns the following header: Allow: GET, HEAD, TRACE, OPTIONS -- Anyone tried this? Is it correct with respect to SPEC and EXAM?

2. Only POST is not idempotent all others are IDEMPOTENT.

3. for distrubuted applications
[1]cannot depend on the notification events generated due to changes in the ServletContext attribute list
[2]cannot depend on the notification events generated when a ServletContext is created or destroyed
[3]cannot depend on the notification events generated due to changes in the session attribute list
[4]cannot depend on the notification events generated when a session is created or destroyed
[5]CAN depend on the notification events generated when a session is activated or passivated


Personally i feel point 2, 3 and 4 are not correct. Even in distributed application, we can trust on session as it exists in only one JVM at any time. Is this correct? Since i am planning to take the exam this weekend, last min tensions started now :roll: ..

Thanks & Regards,
Radmika
SCJP, SCBCD
 
Osama Hasan
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Though a session resides in only one JVM at a time, but the servlet container is not responsible to propagate events generated by a session in one JVM to listeners present in other JVMs. Thus we cannot rely on the notification events generated when a session or servlet context is created or destroyed as well as changes to the attribute lists of session and servlet context.
Correct me if I m wrong.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic