1 22 package org.jboss.test.hotdeploy.servlet; 23 24 import org.jboss.test.hotdeploy.service.TestService; 25 26 import javax.servlet.ServletException ; 27 import javax.servlet.http.HttpServlet ; 28 import javax.servlet.http.HttpServletRequest ; 29 import javax.servlet.http.HttpServletResponse ; 30 31 import java.io.IOException ; 32 import java.io.PrintWriter ; 33 34 37 public class AOPTestServlet extends HttpServlet 38 { 39 40 private static final long serialVersionUID = 1L; 41 42 public void doGet(HttpServletRequest request, 43 HttpServletResponse response) 44 throws ServletException , IOException 45 { 46 47 PrintWriter out = response.getWriter(); 48 System.out.println("Before my method execution"); 49 response.setContentType("text/plain"); 50 out.println("Before my method execution"); 51 TestService testService = new TestService(); 52 testService.saveOrganization(); 53 System.out.println("After my method execution"); 54 out.println("After my method execution"); 55 } 56 57 } 58 | Popular Tags |