Results 1 to 7 of 7
  1. #1
    pateldpk is offline Member
    Join Date
    Apr 2012
    Posts
    27
    Rep Power
    0

    Default "Please wait" message inside JSP

    I Want to display Please wait message before executing JSP script tags..
    Below is the code... but its not showing "Login Succesfull... Please wait ..." message it directly execute the script tags and display the the result...

    Code:

    <%@page import="mvc.helper.help" %>

    <html>
    <head>
    <title>Login Succesfull</title>
    </head>
    <body>
    Login succesfull...please wait

    <%
    String userName=(String)request.getAttribute("user");
    help hp=new help();
    String fName=hp.getName(userName);
    String add=hp.getUser(userName);
    String Email=hp.getUsers(userName);
    %>
    <%
    request.setAttribute("fullName",fName);
    request.setAttribute("Address",add);
    request.setAttribute("Email",Email);
    RequestDispatcher dispatcher=request.getRequestDispatcher("details.j sp");
    dispatcher.forward( request, response);
    %>

    </body>
    </html>

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,196
    Rep Power
    19

    Default Re: "Please wait" message inside JSP

    Moved from Advanced Java

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: "Please wait" message inside JSP

    Jsp is only a way to generate html.

    Why do you want to display a "please wait" message if the action you're waiting on happens immediately?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    pateldpk is offline Member
    Join Date
    Apr 2012
    Posts
    27
    Rep Power
    0

    Default Re: "Please wait" message inside JSP

    No there is no reason behind it.... I just want to know that how to do this..?

  5. #5
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default Re: "Please wait" message inside JSP

    I would guess you would do it using javascript, not with JSP. Of course the JSP could spit out the javascript, but that's a moot point.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: "Please wait" message inside JSP

    It would have to be done on the client (ie Javascript as Kevin says), probably using AJAX.
    The user logs in (an Ajax call) and the client then listens for the response.
    When the server successfully logs in then the client sticks up the message and asks the server to handle the next step.

    Something along those lines.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    varunmails is offline Member
    Join Date
    Apr 2012
    Posts
    2
    Rep Power
    0

    Default Re: "Please wait" message inside JSP

    this can also achieved using Javascript setTimeout() method...

    Be very careful in habdling this as this should execute only one time.., coz.. this script will run for every 5 seconds if u give setTimeout(5000)

Similar Threads

  1. Replies: 10
    Last Post: 03-05-2012, 09:57 PM
  2. Replies: 0
    Last Post: 02-28-2012, 08:13 PM
  3. An "if" statement inside a "for" loop?
    By soccermiles in forum New To Java
    Replies: 18
    Last Post: 04-20-2010, 03:44 AM
  4. Replies: 1
    Last Post: 10-20-2008, 07:35 AM
  5. Java Loader error message "UNC paths not supported"
    By Johnny562 in forum New To Java
    Replies: 1
    Last Post: 07-01-2008, 10:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •