why alert box is not appearing in servlets...?

Ads
 

why alert box is not appearing in servlets...?

//example.java

import java.io.*;  
import javax.servlet.*;  
import javax.servlet.http.*;

public class adduser extends HttpServlet {

public void init(ServletConfig config) throws ServletException
{  
     super.init(config);  
}  
public void doGet(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException
{ 
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
            pw.println("<html><script language=javascript>window.alert('Click Ok to go to Index.jsp')</script></html>");
    res.sendRedirect("index.jsp");  
}

}

View Answers

May 30, 2012 at 6:01 PM

Please go through the following link:

Invoke Javascript in Servlet

The above link will provide you an example that will call javascript method prompt. Similarly, you can call alert method.

Ads









Related Tutorials/Questions & Answers:
why alert box is not appearing in servlets...?
change appearance of alert box
Advertisements
Java Alert Box
Flex Alert Box example
how to use confirmation alert box before delete in jsp?
alert
jQuery alert()
How to set left and top positions of alert box using JQuery in the below code?
alert in jsp
alert for validation
JavaScript Alert YES NO
JavaScript display variable in alert
Alert in Servlet
JSP Alert
jQuery alert()
Why spring?
GETTING ALERT MESSAGE
Javascript alert message
javascript prompt alert
ModuleNotFoundError: No module named 'alert'
jQuery Hello World alert
Why NSMutableDictionary
GETTING AN ALERT MESSAGE
ModuleNotFoundError: No module named 'box-box'
ModuleNotFoundError: No module named 'box-box'
Why request.getParameter(
why this can't
how to create alert message after data submitted into database
javascript statement alert
Why this is not working...?
input box

Ads