Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

JSP + Portlet + Threads question

  • 20-05-2009 12:22pm
    #1
    Registered Users, Registered Users 2 Posts: 495 ✭✭


    I have a small problem, hoping someone can help.

    Here's the setup, I have a JSP with Start and Stop buttons, that is displayed in a portlet.
    The stop button is disabled by default.
    When the start button is clicked, a thread is kicked off from the portlet that handles the JSP, the processAction sets a variable to enable the stop button in the UI.
    If the stop button is clicked ,the thread stops running, the start button is enabled and the stop button is disabled.
    This all runs correctly.
    My question is - is there a way to notify the JSP (either through the portlet or using other means) that the thread has completed, so I can print a message and disable the stop button?


Comments

  • Moderators, Science, Health & Environment Moderators Posts: 10,088 Mod ✭✭✭✭marco_polo


    I have a small problem, hoping someone can help.

    Here's the setup, I have a JSP with Start and Stop buttons, that is displayed in a portlet.
    The stop button is disabled by default.
    When the start button is clicked, a thread is kicked off from the portlet that handles the JSP, the processAction sets a variable to enable the stop button in the UI.
    If the stop button is clicked ,the thread stops running, the start button is enabled and the stop button is disabled.
    This all runs correctly.
    My question is - is there a way to notify the JSP (either through the portlet or using other means) that the thread has completed, so I can print a message and disable the stop button?


    http://www.onjava.com/pub/a/onjava/2003/06/11/jsp_progressbars.html

    I think this is something on to what you are looking for but it is quite different in that it performs forced refresh using javascript. Problem with what you are trying to do is once the JSP has returned the page to the client it has completed the request, there is nothing still running to notify about thread completion.


Advertisement