how could i display a javascript message from a servlet. I am searching examples
thanks for help.
that's a bit confusing: servlet is a server-side technology. JavaScript is working at the client-side (or you have a JS server?). You probably want to use AJAX to display a result of a servlet. I suggest you trying out jQuery.
You can check out this question as well on SO: How to learn AJAX using jQuery in a Java web app