File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interrupting a servlet

 
igwe kalu kalu ogba
Ranch Hand
Posts: 133
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I've written a servlet which runs on my tomcat server. Using the get method on an html page I am able to load this servlet. The problem I have is this:

the doGet method of the servlet usually takes quite a while to complete. nothing wrong with this, i made it so as the program is fairly complex. so the issue for me now is finding a way to interrupt the execution of the doget() method from my html file. I want to do it using a html button or input tag (submit button or anything else). how do i go about it. thanks.
 
Sarath Mohan
Ranch Hand
Posts: 213
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel you can't do it from the html page once a request is submitted we don't have any control on that REQUEST from the html page. It is running as thread inside the servlet. If you try to control from the html page, the request will be all new and it will be new thread again.

Actually what is the real output you want? Why do you need to interrupt from the html page?

You can control the thread in side doGet method anyway which should be coded in the doGet method itself.

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic