• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

How toprint output message to JSP page while processing some time taking job in controller class?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends, I am working on a project which is designed in java spring framework, I am stuck in one scenario where i need to print some output message to JSP page while i am processing some time taking job in controller.
I am running a shell script through java controller class and it is taking 6-8 minutes to finish the job, Mean while i want to print the output message which is coming from shell script,
I tried a lot but not getting any option.

Condition: 1. Every 10 seconds i need to print 10 lines of output message to the JSP page
2. I dont want to disturb running job

Difficulties i am facing: First let me explain the scenario ->
-I have a JSP page where i have a button (ie. Run Linux Command).
-On click of above button i am calling a method of controller class to run the shell script command.
-As i know we cant use new thread to display the output message to the jsp. (I tried but not working)
-I dont want that user should wait for 6-8 minuts without any message or status of running job.
-How can i print the output message to JSP without disturbing the running job?

Please help me on above scenario and let me know the best way to achieve the above scenario.

Immediate response is most appreciated.

Thanks in a advance.

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can achieve this with Ajax.
Your Ajax code tracks the status of the running job on the servers and updates your UI.
reply
    Bookmark Topic Watch Topic
  • New Topic