Switch to full style
What's behind JSP & Servlets
Post a reply

Servelt Hello world I made by myself

Sat Jun 09, 2007 2:08 pm

Using Tomcat server u can run servlets and JSP web applications.Here it is my first step in java web applications using servlets .

Code:
/*
* Test.java
*
* Created on January 27, 2007, 10:44 AM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/

package firstservelt;
import com.sun.corba.se.spi.activation.Server;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.*;

public class Test extends HttpServlet {
   
    /** Creates a new instance of Test */
   
     
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
    {
        resp.setContentType("text/html");
       PrintWriter out=resp.getWriter();
       
       out.println("");
       out.println("");
       out.println("Hello Codemiles is comming");
       out.println("");
    }
   
}




Post a reply
  Related Posts  to : Servelt Hello world I made by myself
 Hello World!     -  
 Hello World using JSP     -  
 JSF hello world     -  
 Need help about chatting application i made...     -  
 HTML Form i made     -  
 Get address of the page from which the request was made     -