• 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

Threads

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i want to make servlet which on a fix time submit particular form.i made such servlet and it is working fine but how to submit form using servelt cause it need that if i want to submit form ,html must run on a browser but i want all work behind the scene.i want all the work behind the scence cause i want all the work multi threaded.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Salam Raja,
When the web container that is running the servlet (Tomcat for ex) sends data to the HTTP client, it uses an opened connection with the HTTP client. That connection is ALWAYS opened by the HTTP client when it requests a resource from the server. So having the web container/servlet send data to the client without having this later request any resource DOES NOT MAKE SENSE (think about TCP at client side that would drop silently all incoming segments that don't belong to any opened connection).
However, you can embed a little script within the HTML page that runs at client side and that sends requests to your servlet periodically behind the scenes. This way, your servlet would reply periodically in a normal way.
regards
[ June 25, 2002: Message edited by: Omar IRAQI ]
 
Raja Islam
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for reply but i am not clear about what to do.actually i want to run MyServlet only once on a server for example mycgiserver.com and then close my computer and all work should do by MyServlet.and there is no inraction of any user and it work using threading for example submit a form etc.pls explain me how to run java script and html without intraction of any user and by only using server side threading.cause there is no browser is open if i close my computer and if no user is connect with it.
 
Omar IRAQI
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raja,
Please help me help you.
regards
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic