"MyFirstServlet"의 두 판 사이의 차이

9번째 줄: 9번째 줄:
*Project Explorer --- MyFirstServlet --- Java resources --- src 우클릭 --- New --- Servlet
*Project Explorer --- MyFirstServlet --- Java resources --- src 우클릭 --- New --- Servlet
*"Create Servlet" --- Java package: myfirstservlet --- Name: Starter --- [Finish]
*"Create Servlet" --- Java package: myfirstservlet --- Name: Starter --- [Finish]
<source lang='java'>
package myfirstservlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class Starter
*/
@WebServlet("/Starter")
public class Starter extends HttpServlet {
private static final long serialVersionUID = 1L;
    /**
    * Default constructor.
    */
    public Starter() {
        // TODO Auto-generated constructor stub
    }
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}
</source>
==주석==
<references/>


[[분류: Java]]
[[분류: Java]]

2013년 1월 27일 (일) 17:53 판

Crystal Clear action info.png 작성 중인 문서입니다.
MyFirstServlet

1 절차

  • File --- New -- Project...
  • "Select a wizard" --- Web --- Dynamic Web Project --- [Next >]
  • "Dynamic Web Project" --- Project name: MyFirstServlet --- [Finish]
  • "Open Associated Perspective?" --- [Yes][1]
  • Project Explorer --- MyFirstServlet --- Java resources --- src 우클릭 --- New --- Servlet
  • "Create Servlet" --- Java package: myfirstservlet --- Name: Starter --- [Finish]
package myfirstservlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class Starter
 */
@WebServlet("/Starter")
public class Starter extends HttpServlet {
	private static final long serialVersionUID = 1L;

    /**
     * Default constructor. 
     */
    public Starter() {
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}

2 주석

  1. Package Explorer가 Project Explorer로 바뀜
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}