Problem in Implementing the example of headfirst servlets and jsp in netbeans
Rachit Kumar Saxena
Ranch Hand
Joined: Dec 24, 2011
Posts: 48
posted
0
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?
Rachit Kumar Saxena wrote:(example is given as newservlet.jpeg(please open it with any text editor as it is not a valid .jpeg file)).
What is it then? A txt file? If the contents are too large then zip it attach the .zip. If the contents aren't that much, then just post those inline within your post.
As for your question, it doesn't look like it has anything to do with IDE. Once you post more details, I or some other moderator will move this to the Servlet forum.
Rachit Kumar Saxena
Ranch Hand
Joined: Dec 24, 2011
Posts: 48
posted
0
Yes,it is a .txt file but labelled as .jpeg FILE.As for the question,the details are:
As each request is handled in a separate thread,the output should have been affected,the second time the example is run,but the output remains same in netbeans.Why?
Rachit Kumar Saxena wrote:Yes,it is a .txt file but labelled as .jpeg FILE.As for the question,the details are:
As each request is handled in a separate thread,the output should have been affected,the second time the example is run,but the output remains same in netbeans.Why?
Like I said, you have to fix that attachment (attach an .zip containing that txt file instead or post the contents of the txt file). Without that information, I've no clue what output and what program you are talking about.
Rachit Kumar Saxena
Ranch Hand
Joined: Dec 24, 2011
Posts: 48
posted
0
This is the .zip file in the attachment containing the .java file i was talking about.