/*
 * Created on Apr 27, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package groovy.servlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.PageContext;

/**
 * @author sam
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public class ServletCategory {
	
    /**
     * Servlet support
     */
    public static Object get(ServletContext context, String key) {
        return context.getAttribute(key);
    }
    
    public static Object get(HttpSession session, String key) {
        return session.getAttribute(key);
    }
    
    public static Object get(ServletRequest request, String key) {
        return request.getAttribute(key);
    }

    public static Object get(PageContext context, String key) {
        return context.getAttribute(key);
    }

}

@@ -1039,10 +1039,516 @@
 %0A    %7D%0A%0A
+    public static void set(ServletContext context, String key, Object value) %7B%0A        context.setAttribute(key, value);%0A    %7D%0A%0A    public static void set(HttpSession session, String key, Object value) %7B%0A        session.setAttribute(key, value);%0A    %7D%0A%0A    public static void set(ServletRequest request, String key, Object value) %7B%0A        request.setAttribute(key, value);%0A    %7D%0A%0A    public static void set(PageContext context, String key, Object value) %7B%0A        context.setAttribute(key, value);%0A    %7D%0A%0A
 %7D%0A

Add the setters to the servlet getters in the category.