• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sending multiple mobile client requests to servlet?

 
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 new to this forum and I am facing a problem. It is like- I have written some MIDlet application for Mobiles which sends HTTP post data to a servlet running on some address and the servlet takes the request data, processes them and gives back results as response. The data comes ok at device end if only one device sends request.But for multiple requests from multiple devices sent simultaneouly to the same servlet at the same location(URL), the results at each device end sometimes comes different and sometimes the results are not shown to the proper device which sent a differnt request. say, three mobile clients send 3 different requests, then at each device end the result should be different..but in my case, two showing same results and one showing different results...

How come the servlet handle each clients request separately so that each device gets the appropriate result according to its query..Is there any Multi threading can be done at servlet side so that it will handle each device request separately..

please keep in mind..i m new to servlet and Java stuff..please guide me how can oercome this situation so that the servlet can handle multiple client request separately for processing.

Or is there any code chnge should be done at my mobile device side to handle response...

Thanks and regards,
sanjay
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you've run across the old thread safe servlets problem . This Article will help you out with some tips and tricks. I also recommend googling for thread safe servlets to find more
 
reply
    Bookmark Topic Watch Topic
  • New Topic