This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Auto-submit <form> to a servlet. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Auto-submit <form> to a servlet." Watch "Auto-submit <form> to a servlet." New topic
Author

Auto-submit <form> to a servlet.

Bitan Biswas
Greenhorn

Joined: Aug 05, 2011
Posts: 12
i need to submit a <form> from a jsp page when time is over. i have a countdown timer with java. when the timer goes to 00:00, submit <form> to a servlet.
please help me giving by a code.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

Bitan Biswas wrote:i need to submit a <form> from a jsp page when time is over. i have a countdown timer with java. when the timer goes to 00:00, submit <form> to a servlet.

Java and JSP are not going to help you at all with this. Once the page is sent to the browser, there's no more server-side code running. Please read this article to understand how JSP operates.

please help me giving by a code.

That's not how things work here at the Ranch. You write the code, and we help you with problems you are having with it.

Some hints to get you going:
  • JavaScript window.setTimeout() can be used to trigger a handler after a specific delay.
  • There's a .submit() method on the form element that can be used to cause the form to submit under script control.


  • [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    Sharon Melissa
    Greenhorn

    Joined: Aug 12, 2011
    Posts: 5
    @ bear

    Thanks for sharing this article on JSP
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Auto-submit <form> to a servlet.
     
    Similar Threads
    SEVERE: BAD packet signature 200,SEVERE: Caught exception (java.lang.NullPointerException)
    Forcing a submit on a timeout
    Servlet processing termination
    Servlet Mapping
    Submit the form