1
<%@ page language=”java” contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%> <!DOCTYPE html> <html> <head> <title>Display Pop-up on Page Load using JSP</title> </head> <body> <h1>Welcome to My Page</h1> <script> window.onload = function() { var str = “This is a pop-up message!”; alert(str); }; </script> </body> </html>