Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package cl.adl.prueba;
- import java.io.IOException;
- import java.io.PrintWriter;
- 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 GeneradorIndex
- */
- @WebServlet("/GeneradorIndex")
- public class GeneradorIndex extends HttpServlet {
- private static final long serialVersionUID = 1L;
- /**
- * @see HttpServlet#HttpServlet()
- */
- public GeneradorIndex() {
- super();
- // 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
- //response.getWriter().append("Served at: ").append(request.getContextPath());
- PrintWriter pw = response.getWriter();
- pw.println("<h1>Hola Mundo</h1>");
- }
- /**
- * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
- */
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- doGet(request, response);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement