This is an article for explaining on how to do the one mentioned in the title of this article. It is about how to print string in a web page. Basically, the main purpose is for printing certain string or characters in a web page from a servlet. By accessing the URL defining the servlet, there will be a string or characters appear in the web page. Below is the actual step for trying to achieve the purpose :
1. First of all, just create the necessary servlet. In this context, creating the servlet is done by using a Java IDE which is the Netbeans Java IDE. The following is the image for creating the servlet :