Note : This Blog Has No Concerns With Any Of The College Institute.
Developed & Maintained By RAJ SAHIN N.
package test; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println(""); out.println(""); out.println("Hello Servlet! "); out.println(""); out.println(""); out.println("Hello World!"); out.println(""); out.println(""); } }
<?xml version="1.0" encoding="ISO-8859-1"?> <web-app> <servlet> <servlet-name>HelloWorld</servlet-name> <servlet-class>test.HelloWorld</servlet-class> </servlet> <servlet-mapping> <servlet-name>HelloWorld</servlet-name> <url-pattern>/HelloWorld</url-pattern> </servlet-mapping> </web-app>
No comments:
Post a Comment