Created
September 30, 2017 07:50
-
-
Save kundzi/fbcbbede492c41a9946a7f89a9260bf3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package by.htp.servlet; | |
| import java.io.IOException; | |
| import javax.servlet.ServletException; | |
| import javax.servlet.http.HttpServlet; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; | |
| public class FirstServlet extends HttpServlet { | |
| private static final long serialVersionUID = 1L; | |
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
| response.setContentType("text/html"); | |
| response.getWriter().println("This is " + getClass().getName() + ",using the GET method"); | |
| } | |
| protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
| response.setContentType("text/html"); | |
| response.getWriter().println("This is " + getClass().getName() + ",using the POST method"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment