Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call Perl Scripts from a jsp  RSS feed

 
Kheerthan Singh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to execute a Perl Script from a jsp and show a progress bar on the web page while the Perl Script is running.
Please can you suggest ideas for doing this.
Thanks for your help.
Kheerthan
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thread that runs a JSP request/response can't do two things at once so it gets a bit complicated. Probably the best thing to do is to create a Bean that runs its own Thread to exec() the Perl program and collect the output. By having a separate Bean you can test it outside the JSP container.
Your first entry to the JSP would create the bean, start the Thread and return some response to the request. On the browser side you would have to have some mechanism to make periodic requests that would get status reports until the Bean process was finished.
Bill
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!