Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with Jsp's multiple request going to same jsp  RSS feed

 
Rohit Khetarpal
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing one issue with Jsp's multiple request going to same jsp.
Scenario: I have one jsp with two forms(one inner and one outer) with action as on same jsp and that jsp is having few log statements which i want to control over both request.
Now the issue is control over these two request on same jsp i.e. sometimes one request comes before other req,sometimes other req comes before first req. which results in problem of logging log statements ordering.

May i know any solution over this issue.
Any help will be appreciated!

Thanks in Advance.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Javaranch
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am not getting your question.
 
Tim Holloway
Bartender
Posts: 18704
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP's work best when used as the View in a Model/View/Controller setup. The more logic you put in a JSP, the more headaches you'll have. Which is why frameworks like Struts and JSF are so popular.

The whole point of a web server is to be multi-user, and the most efficient way to be multi-user is to be multi-threaded. And as a consequence, the sequence of requests is unpredictable.

If you need explicit ordering of operations, that's up to you to manage. By default, the server is going to do exactly what you've seen it do.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!