Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Issue with Jsp's multiple request going to same jsp

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Javaranch
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am not getting your question.
 
Saloon Keeper
Posts: 28056
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic