postheadericon hello world servlet example

Step 1 :  Create .java File using text editor


import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class ServletDemo extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException,IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML><HEAD><TITLE>WTAD</TITLE></HEAD> <body>");
String str="<h1>welcome to </h1>";
str=str+"<br>www.bipinrupadiya.blogspot.com";
out.println(str);
        out.println("</body> </html>");
}
}

postheadericon Setup Environment Variable for Tomcat



Step : 1 Right Click on My computer and Choose Propertis


    Step : 2 From System Properties Dialog box got to Advance tab and click on Environment Variable Button


    postheadericon install tomcat 7

    This text define How to install Tomcat Application server on windows operating system


    Step : 1 Download Java Development Kit 


    • Servlet required Java Development Kit to compile and Execute  code 
    • Go to http://www.oracle.com and Download latest version of JDK and JRE
    • Install JDK

    Step : 2 Select IDE for the Development of Servlet

    • There so many editor used for J2EE Devlopment like NetBeans, Eclipse, Dreamviewer or Plain Text Editor etc.
    • We use Notpad  as per GTU Guidelines  

    Total Pageviews

    © BipinRupadiya.com. Powered by Blogger.