FileDocCategorySizeDatePackage
LeakyServlet.javaAPI DocExample1033Sun Jul 06 01:05:38 BST 2003antipatterns

LeakyServlet

public class LeakyServlet extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddestroy()

protected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        HttpSession session = request.getSession();
        
        AddressBean address = new AddressBean();
        address.setFirst(request.getParameter("first"));
        address.setLast(request.getParameter("last"));
        
        session.setAttribute("antipatterns.address", address);
        
        RequestDispatcher dispatcher = 
            getServletContext().getRequestDispatcher("/AddressView.jsp");
        dispatcher.forward(request, response);
    
public voidinit(javax.servlet.ServletConfig config)

        super.init(config);