Win a copy of Practical SVG this week in the HTML/CSS/JavaScript 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: 54
  • 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
Sheriff
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.
 
Yes, my master! Here is the tiny ad you asked for:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!