hi, i beginner for this, i created one button in servlet code using HTML when i pressed that button one text have to print eg "welcome" please give idea i new to this
There are two very different ways that an HTML button can do something. First, it can send a new HTTP request back to the server; another servlet (or some such) can then send back a page that says "Hello". That new page can replace the existing one, be shown in a new tab or window, be shown in an IFRAME, or (using Javascript) it can be integrated into the existng page.
The other way is to use Javascript. In this case, all the code executes in the browser. You could display your message in any of the ways noted above, or in a Javascript alert box.