01: /*
02: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
03: *
04: * This file is part of Resin(R) Open Source
05: *
06: * Each copy or derived work must preserve the copyright notice and this
07: * notice unmodified.
08: *
09: * Resin Open Source is free software; you can redistribute it and/or modify
10: * it under the terms of the GNU General Public License as published by
11: * the Free Software Foundation; either version 2 of the License, or
12: * (at your option) any later version.
13: *
14: * Resin Open Source is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17: * of NON-INFRINGEMENT. See the GNU General Public License for more
18: * details.
19: *
20: * You should have received a copy of the GNU General Public License
21: * along with Resin Open Source; if not, write to the
22: *
23: * Free SoftwareFoundation, Inc.
24: * 59 Temple Place, Suite 330
25: * Boston, MA 02111-1307 USA
26: *
27: * @author Scott Ferguson
28: */
29:
30: package com.caucho.jsp;
31:
32: /**
33: * Configuration for a JSP page. Includes directives.
34: */
35: public class JspPageConfig {
36: /*
37: * Variables storing the JSP directives.
38: */
39: private boolean _isThreadSafe = true;
40: private boolean _hasTrueSession = false;
41: private boolean _hasFalseSession = false;
42: private boolean _hasSession = true;
43:
44: private boolean _useEndTagHack = true;
45: private boolean _ideHack = false;
46:
47: private int _bufferSize = 8 * 1024;
48: private boolean _autoFlush = true;
49: private boolean _isErrorPage = false;
50: private String _errorPage = null;
51: private String _servletInfo = null;
52: private String _contentType = null;
53: private String _charEncoding = null;
54: private String _language = null;
55: private String _session = null;
56: private String _buffer = null;
57:
58: private boolean _staticEncoding;
59:
60: private boolean _isXml;
61:
62: // XXX: needed in combination with XTP
63: private boolean _alwaysModified;
64:
65: private boolean _isELEnabled;
66: private boolean _fastJstl = true;
67:
68: /**
69: * Returns true if the JSP page is thread safe.
70: */
71: public boolean isThreadSafe() {
72: return _isThreadSafe;
73: }
74:
75: /**
76: * Set true if the JSP page is thread safe.
77: */
78: public void setThreadSafe(boolean isThreadSafe) {
79: _isThreadSafe = isThreadSafe;
80: }
81:
82: /**
83: * Returns true if static text encoding is allowed.
84: */
85: public boolean isStaticEncoding() {
86: return _staticEncoding;
87: }
88:
89: /**
90: * Set true if static text encoding is allowed.
91: */
92: public void setStaticEncoding(boolean allowStaticEncoding) {
93: _staticEncoding = allowStaticEncoding;
94: }
95: }
|