Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem in Implementing the example of headfirst servlets and jsp in netbeans

 
Rachit Kumar Saxena
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Report post to moderator
I was trying an example of the example of above book on page 190(example is given as newservlet.jpeg(please open it with any text editor as it is not a valid .jpeg file)).The first time when the servlet is run though the output is 22 and 42,but as the context attributes arent thread safe,the second time when I run the servlet the result should have been affected(as pointed out in the book),but i see the same output.Why do i see the same output each time?
newservlet.jpeg
[Thumbnail for newservlet.jpeg]
 
Palak Mathur
Ranch Hand
Posts: 342
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rachit Kumar Saxena wrote:I was trying an example of the example of above book on page 190(example is given as newservlet.jpeg(please open it with any text editor as it is not a valid .jpeg file)).The first time when the servlet is run though the output is 22 and 42,but as the context attributes arent thread safe,the second time when I run the servlet the result should have been affected(as pointed out in the book),but i see the same output.Why do i see the same output each time?


This is not the right forum to ask questions like this one.

Moderators,

Please move this to the appropriate forum.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Actually, Rachit already has created a duplicate thread here http://www.coderanch.com/t/583965/vc/Implementing-example-headfirst-servlets-jsp. Locking this one.
 
    Bookmark Topic Watch Topic
  • New Topic