01: /**
02: * $RCSfile$
03: * $Revision: 750 $
04: * $Date: 2004-12-26 18:54:13 -0800 (Sun, 26 Dec 2004) $
05: *
06: * Copyright (C) 2004 Jive Software. All rights reserved.
07: *
08: * This software is published under the terms of the GNU Public License (GPL),
09: * a copy of which is included in this distribution.
10: */package org.jivesoftware.util;
11:
12: import javax.servlet.ServletContext;
13: import javax.servlet.http.HttpServletRequest;
14: import javax.servlet.http.HttpServletResponse;
15: import javax.servlet.http.HttpSession;
16: import javax.servlet.jsp.JspWriter;
17: import javax.servlet.jsp.PageContext;
18:
19: public abstract class WebBean {
20:
21: public HttpSession session;
22: public HttpServletRequest request;
23: public HttpServletResponse response;
24: public ServletContext application;
25: public JspWriter out;
26:
27: public void init(HttpServletRequest request,
28: HttpServletResponse response, HttpSession session,
29: ServletContext app, JspWriter out) {
30: this .request = request;
31: this .response = response;
32: this .session = session;
33: this .application = app;
34: this .out = out;
35: }
36:
37: public void init(HttpServletRequest request,
38: HttpServletResponse response, HttpSession session,
39: ServletContext app) {
40:
41: this .request = request;
42: this .response = response;
43: this .session = session;
44: this .application = app;
45: }
46:
47: public void init(PageContext pageContext) {
48: this .request = (HttpServletRequest) pageContext.getRequest();
49: this .response = (HttpServletResponse) pageContext.getResponse();
50: this .session = (HttpSession) pageContext.getSession();
51: this .application = (ServletContext) pageContext
52: .getServletContext();
53: this .out = (JspWriter) pageContext.getOut();
54: }
55: }
|