Web tier: servlets, JSP, Web frameworks: How to write a Javascript in a Servlet ?

  1. How to write a Javascript in a Servlet ? (1 messages)

    I need to write a confirm dialog box in a Servelet. Can anyone help me to how to do it ?
  2. hi
      there's keyword called "Confirm" in javascript which is similar to "alert" dialog box(hope u know that). The difference is that confirm box gives you the Yes/no options.
    you could try out like this
      return true;
     return false;

    try out ..

    another alternate way to do is that instead of writing javascript(which could be viewed by all users), you could write a javaprogram using awt and execute it inside the servlet.but this would be complex and secure so that no one could see ur source code.