Author: markt
Date: Sun Jun 24 09:46:03 2007
New Revision: 550256
URL: http://svn.apache.org/viewvc?view=rev&rev=550256
Log:
Tabs -> 8 spaces
Modified:
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JspConfig.java
Modified:
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JspConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JspConfig.java?view=diff&rev=550256&r1=550255&r2=550256
==============================================================================
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JspConfig.java
(original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JspConfig.java
Sun Jun 24 09:46:03 2007
@@ -49,13 +49,13 @@
private ServletContext ctxt;
private boolean initialized = false;
- private String defaultIsXml = null; // unspecified
- private String defaultIsELIgnored = null; // unspecified
+ private String defaultIsXml = null; // unspecified
+ private String defaultIsELIgnored = null; // unspecified
private String defaultIsScriptingInvalid = "false";
private JspProperty defaultJspProperty;
public JspConfig(ServletContext ctxt) {
- this.ctxt = ctxt;
+ this.ctxt = ctxt;
}
private void processWebDotXml(ServletContext ctxt) throws JasperException {
@@ -65,26 +65,26 @@
try {
URL uri = ctxt.getResource(WEB_XML);
if (uri == null) {
- // no web.xml
+ // no web.xml
return;
- }
+ }
is = uri.openStream();
InputSource ip = new InputSource(is);
ip.setSystemId(uri.toExternalForm());
ParserUtils pu = new ParserUtils();
- TreeNode webApp = pu.parseXMLDocument(WEB_XML, ip);
+ TreeNode webApp = pu.parseXMLDocument(WEB_XML, ip);
- if (webApp == null
+ if (webApp == null
|| !"2.4".equals(webApp.findAttribute("version"))) {
- defaultIsELIgnored = "true";
- return;
- }
- TreeNode jspConfig = webApp.findChild("jsp-config");
- if (jspConfig == null) {
- return;
- }
+ defaultIsELIgnored = "true";
+ return;
+ }
+ TreeNode jspConfig = webApp.findChild("jsp-config");
+ if (jspConfig == null) {
+ return;
+ }
jspProperties = new Vector();
Iterator jspPropertyList =
jspConfig.findChildren("jsp-property-group");
@@ -161,7 +161,7 @@
if ((path == null && (extension == null || isStar))
|| (path != null && !isStar)) {
if (log.isWarnEnabled()) {
- log.warn(Localizer.getMessage(
+ log.warn(Localizer.getMessage(
"jsp.warning.bad.urlpattern.propertygroup",
urlPattern));
}
@@ -194,14 +194,14 @@
private void init() throws JasperException {
- if (!initialized) {
- processWebDotXml(ctxt);
- defaultJspProperty = new JspProperty(defaultIsXml,
- defaultIsELIgnored,
- defaultIsScriptingInvalid,
- null, null, null);
- initialized = true;
- }
+ if (!initialized) {
+ processWebDotXml(ctxt);
+ defaultJspProperty = new JspProperty(defaultIsXml,
+ defaultIsELIgnored,
+ defaultIsScriptingInvalid,
+ null, null, null);
+ initialized = true;
+ }
}
/**
@@ -247,38 +247,38 @@
*/
public JspProperty findJspProperty(String uri) throws JasperException {
- init();
+ init();
+
+ // JSP Configuration settings do not apply to tag files
+ if (jspProperties == null || uri.endsWith(".tag")
+ || uri.endsWith(".tagx")) {
+ return defaultJspProperty;
+ }
+
+ String uriPath = null;
+ int index = uri.lastIndexOf('/');
+ if (index >=0 ) {
+ uriPath = uri.substring(0, index+1);
+ }
+ String uriExtension = null;
+ index = uri.lastIndexOf('.');
+ if (index >=0) {
+ uriExtension = uri.substring(index+1);
+ }
+
+ Vector includePreludes = new Vector();
+ Vector includeCodas = new Vector();
- // JSP Configuration settings do not apply to tag files
- if (jspProperties == null || uri.endsWith(".tag")
- || uri.endsWith(".tagx")) {
- return defaultJspProperty;
- }
-
- String uriPath = null;
- int index = uri.lastIndexOf('/');
- if (index >=0 ) {
- uriPath = uri.substring(0, index+1);
- }
- String uriExtension = null;
- index = uri.lastIndexOf('.');
- if (index >=0) {
- uriExtension = uri.substring(index+1);
- }
-
- Vector includePreludes = new Vector();
- Vector includeCodas = new Vector();
-
- JspPropertyGroup isXmlMatch = null;
- JspPropertyGroup elIgnoredMatch = null;
- JspPropertyGroup scriptingInvalidMatch = null;
- JspPropertyGroup pageEncodingMatch = null;
+ JspPropertyGroup isXmlMatch = null;
+ JspPropertyGroup elIgnoredMatch = null;
+ JspPropertyGroup scriptingInvalidMatch = null;
+ JspPropertyGroup pageEncodingMatch = null;
- Iterator iter = jspProperties.iterator();
- while (iter.hasNext()) {
+ Iterator iter = jspProperties.iterator();
+ while (iter.hasNext()) {
- JspPropertyGroup jpg = (JspPropertyGroup) iter.next();
- JspProperty jp = jpg.getJspProperty();
+ JspPropertyGroup jpg = (JspPropertyGroup) iter.next();
+ JspProperty jp = jpg.getJspProperty();
// (arrays will be the same length)
String extension = jpg.getExtension();
@@ -327,30 +327,30 @@
if (jp.getPageEncoding() != null) {
pageEncodingMatch = selectProperty(pageEncodingMatch, jpg);
}
- }
+ }
- String isXml = defaultIsXml;
- String isELIgnored = defaultIsELIgnored;
- String isScriptingInvalid = defaultIsScriptingInvalid;
- String pageEncoding = null;
-
- if (isXmlMatch != null) {
- isXml = isXmlMatch.getJspProperty().isXml();
- }
- if (elIgnoredMatch != null) {
- isELIgnored = elIgnoredMatch.getJspProperty().isELIgnored();
- }
- if (scriptingInvalidMatch != null) {
- isScriptingInvalid =
- scriptingInvalidMatch.getJspProperty().isScriptingInvalid();
- }
- if (pageEncodingMatch != null) {
- pageEncoding = pageEncodingMatch.getJspProperty().getPageEncoding();
- }
+ String isXml = defaultIsXml;
+ String isELIgnored = defaultIsELIgnored;
+ String isScriptingInvalid = defaultIsScriptingInvalid;
+ String pageEncoding = null;
- return new JspProperty(isXml, isELIgnored, isScriptingInvalid,
- pageEncoding, includePreludes, includeCodas);
+ if (isXmlMatch != null) {
+ isXml = isXmlMatch.getJspProperty().isXml();
+ }
+ if (elIgnoredMatch != null) {
+ isELIgnored = elIgnoredMatch.getJspProperty().isELIgnored();
+ }
+ if (scriptingInvalidMatch != null) {
+ isScriptingInvalid =
+ scriptingInvalidMatch.getJspProperty().isScriptingInvalid();
+ }
+ if (pageEncodingMatch != null) {
+ pageEncoding =
pageEncodingMatch.getJspProperty().getPageEncoding();
+ }
+
+ return new JspProperty(isXml, isELIgnored, isScriptingInvalid,
+ pageEncoding, includePreludes, includeCodas);
}
/**
@@ -379,7 +379,6 @@
while (iter.hasNext()) {
JspPropertyGroup jpg = (JspPropertyGroup) iter.next();
- JspProperty jp = jpg.getJspProperty();
String extension = jpg.getExtension();
String path = jpg.getPath();
@@ -401,73 +400,73 @@
}
static class JspPropertyGroup {
- private String path;
- private String extension;
- private JspProperty jspProperty;
-
- JspPropertyGroup(String path, String extension,
- JspProperty jspProperty) {
- this.path = path;
- this.extension = extension;
- this.jspProperty = jspProperty;
- }
-
- public String getPath() {
- return path;
- }
-
- public String getExtension() {
- return extension;
- }
-
- public JspProperty getJspProperty() {
- return jspProperty;
- }
+ private String path;
+ private String extension;
+ private JspProperty jspProperty;
+
+ JspPropertyGroup(String path, String extension,
+ JspProperty jspProperty) {
+ this.path = path;
+ this.extension = extension;
+ this.jspProperty = jspProperty;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public String getExtension() {
+ return extension;
+ }
+
+ public JspProperty getJspProperty() {
+ return jspProperty;
+ }
}
static public class JspProperty {
- private String isXml;
- private String elIgnored;
- private String scriptingInvalid;
- private String pageEncoding;
- private Vector includePrelude;
- private Vector includeCoda;
-
- public JspProperty(String isXml, String elIgnored,
- String scriptingInvalid, String pageEncoding,
- Vector includePrelude, Vector includeCoda) {
-
- this.isXml = isXml;
- this.elIgnored = elIgnored;
- this.scriptingInvalid = scriptingInvalid;
- this.pageEncoding = pageEncoding;
- this.includePrelude = includePrelude;
- this.includeCoda = includeCoda;
- }
-
- public String isXml() {
- return isXml;
- }
-
- public String isELIgnored() {
- return elIgnored;
- }
-
- public String isScriptingInvalid() {
- return scriptingInvalid;
- }
-
- public String getPageEncoding() {
- return pageEncoding;
- }
-
- public Vector getIncludePrelude() {
- return includePrelude;
- }
-
- public Vector getIncludeCoda() {
- return includeCoda;
- }
+ private String isXml;
+ private String elIgnored;
+ private String scriptingInvalid;
+ private String pageEncoding;
+ private Vector includePrelude;
+ private Vector includeCoda;
+
+ public JspProperty(String isXml, String elIgnored,
+ String scriptingInvalid, String pageEncoding,
+ Vector includePrelude, Vector includeCoda) {
+
+ this.isXml = isXml;
+ this.elIgnored = elIgnored;
+ this.scriptingInvalid = scriptingInvalid;
+ this.pageEncoding = pageEncoding;
+ this.includePrelude = includePrelude;
+ this.includeCoda = includeCoda;
+ }
+
+ public String isXml() {
+ return isXml;
+ }
+
+ public String isELIgnored() {
+ return elIgnored;
+ }
+
+ public String isScriptingInvalid() {
+ return scriptingInvalid;
+ }
+
+ public String getPageEncoding() {
+ return pageEncoding;
+ }
+
+ public Vector getIncludePrelude() {
+ return includePrelude;
+ }
+
+ public Vector getIncludeCoda() {
+ return includeCoda;
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]