This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Threads" Watch "Threads" New topic
Author

Threads

Raja Islam
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
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.
Omar IRAQI
Ranch Hand

Joined: Jul 06, 2001
Posts: 54
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 ]

Omar IRAQI Houssaini
Raja Islam
Ranch Hand

Joined: Dec 07, 2001
Posts: 74
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

Joined: Jul 06, 2001
Posts: 54
Hi Raja,
Please help me help you.
regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Threads
 
Similar Threads
Call a Servlet but open it in a new window?
Submit the form
JSP - Servlet interaction.
How to keep a button from submitting a form.
how to validate form and submit the data to servlet at a time