1 29 30 package javax.script.http; 31 32 import javax.script.ScriptContext; 33 import javax.servlet.Servlet ; 34 import javax.servlet.ServletException ; 35 import javax.servlet.http.HttpServletRequest ; 36 import javax.servlet.http.HttpServletResponse ; 37 import java.io.IOException ; 38 import java.io.Reader ; 39 40 43 public interface HttpScriptContext extends ScriptContext { 44 public static int REQUEST_SCOPE = 0; 45 public static int APPLICATION_SCOPE = 175; 46 public static int SESSION_SCOPE = 150; 47 48 51 public void initialize(Servlet servlet, 52 HttpServletRequest request, 53 HttpServletResponse response) 54 throws ServletException ; 55 56 59 public void release(); 60 61 64 public Object getAttribute(String name, int scope); 65 66 69 public Object getAttribute(String name); 70 71 74 public void setAttribute(String name, Object value, int scope); 75 76 79 public Reader getScriptSource(); 80 81 84 public HttpServletRequest getRequest(); 85 86 89 public HttpServletResponse getResponse(); 90 91 94 public Servlet getServlet(); 95 96 99 public void forward(String path) 100 throws ServletException , IOException ; 101 102 105 public void include(String path) 106 throws ServletException , IOException ; 107 108 111 public boolean disableScript(); 112 113 116 public boolean useSession(); 117 118 121 public boolean displayResults(); 122 123 126 public String []getMethods(); 127 128 131 public String []getAllowedLanguages(); 132 } 133 134 | Popular Tags |