Results 1 to 6 of 6

Thread: JSP and Servlet problem

  1. #1
    Join Date
    Apr 2010
    Posts
    73

    JSP and Servlet problem

    Hi, I am trying to briefly describe my problem. On the page that was generated JSP, users can click an icon. After that certain information is passed to a servlet. Servlet starts the execution of the statement (as thread). The user gets the same page again, but the icons are grayed out (you can not click on it) for as long until the thread finished execution. According to that page when the user is updated with the message "process is to be at an end" or something and the icons displayed again clickable. At the moment I solve the problem in that the user click on a link must learn whether the process is still running or not. If the process is no longer running "normal" clickable "icons are displayed.

    My question is, how do I solve the problem? The servlet will send the current Jsp with new content (clickable links) to the user when the thread is finished. I hope I have formulated my problem understandable. Need help as soon as possible.

  2. #2
    Join Date
    Mar 2008
    Posts
    258

    Re: JSP and Servlet problem

    hello, I would imagine you doing it to a kind of progress bar in the browser, right? From server side, you can change the output in the browser only on request basis, ie every time the browser sends a request to the server, the browser gets the response. So you can realize a kind of progress bar you could always call the same servlet instance, that if your thread is standard stuff again passes automatically to the response page. If the thread is not finished, the same HTML page with the progress bar (complemented by the% returned). I think that you might have realized the thing.

  3. #3
    Join Date
    Apr 2010
    Posts
    73

    Re: JSP and Servlet problem

    Thanks 'Khushal' for trying me to explain. I have tried to so lot of things but was not successful. So it would be better if you explain me in bit details. If possible, please try to give me some sample of it. Once again I would like to appreciate your help. Expecting some more help sooner.

  4. #4
    Join Date
    Mar 2008
    Posts
    258

    Re: JSP and Servlet problem

    OK... I will try to explain in bit deeper. Reloading as you can realize this:

    HTML Code:
    <head>
     <meta http-equiv="refresh" content= "5; URL=http://the.selfhtml.org/">
     <! - ...  other information in the file header ...  ->
     </ Head>
    This is every 5 seconds, the URL "http://the.selfhtml.org" called. Of course there should be at your URL and might be a refresh every 1-2 seconds.

  5. #5
    Join Date
    Apr 2008
    Posts
    193

    Re: JSP and Servlet problem

    I think on this issue you should look at the times you now widely available AJAX toolkits. So I think that you should make some changes in the AJAX toolkits. And then use for the presentation of progress or to manipulation of the HTML DOM's to a page without reloading only. You will get more details about the AJAX toolkits here. Hope that you will find some useful thing from this post.

  6. #6
    Join Date
    Oct 2008
    Posts
    167

    Re: JSP and Servlet problem

    I think on this issue you should look at the times you now widely available AJAX toolkits. So I think that you should make some changes in the AJAX toolkits.
    Like "Mecurtis", I would take one of the many JavaScript Tookits. I have been using the example Dojotoolkit (http://www.dojotoolkit.org worked) and am thrilled with the scripts since you no longer need to take care of the various browsers. With Dojo you should at understand best in the examples on the website and take the source code of the examples as a template. Another interesting project is also jMaki (https://ajax.dev.java.net/) , which attempts a framework under a hat to get the little, but I have not worked so unfortunately.

Similar Threads

  1. Difference between Servlet & ASP
    By Owen Fernandes in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 10:53 AM
  2. What is Servlet container?
    By Sonam Goenka in forum Software Development
    Replies: 5
    Last Post: 05-02-2010, 08:13 AM
  3. Problem While Passing Parameter To Servlet In JSP
    By Jagdish Gada in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 02:33 PM
  4. Servlet problem to send pdf
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 12-01-2010, 10:41 AM
  5. Invoke servlet from EJB components?
    By Nurhan in forum Software Development
    Replies: 3
    Last Post: 01-04-2009, 09:59 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,561,474.89292 seconds with 17 queries