Author: costin
Date: Sat Jun 14 08:41:23 2008
New Revision: 667818
URL: http://svn.apache.org/viewvc?rev=667818&view=rev
Log:
Various bug fixes and cleanups.
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/AddonSupport.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/UserTemplateClassMapper.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspFileTemplateServlet.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SimpleTemplateClassMapper.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/WildcardTemplateServlet.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/RequestDispatcherImpl.java
Sat Jun 14 08:41:23 2008
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.lite;
import java.io.IOException;
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletContextImpl.java
Sat Jun 14 08:41:23 2008
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.lite;
@@ -58,6 +57,7 @@
import org.apache.tomcat.servlets.addon.ConfigurableContextListeners;
import org.apache.tomcat.servlets.addon.ConfigurableServletContext;
import org.apache.tomcat.servlets.addon.UserSessionManager;
+import org.apache.tomcat.servlets.addon.UserTemplateClassMapper;
import org.apache.tomcat.servlets.config.FilterData;
import org.apache.tomcat.servlets.config.FilterMappingData;
import org.apache.tomcat.servlets.config.ServletData;
@@ -1193,6 +1193,19 @@
SERVLETS_PACKAGE + ".session.SessionManagerServlet");
}
+ String jspCompilerKey = AddonSupport.ADDON_PREFIX +
+ UserTemplateClassMapper.class.getSimpleName();
+
+ if (null == webAppData.contextParam.get(jspCompilerKey)) {
+ // Use jasper by default if nothing else set.
+ // It may fail if the library is not included - it
+ // is loaded on demand when a jsp needs to be compiled.
+ // but not needed if it's already compiled
+ webAppData.contextParam.put(jspCompilerKey,
+ ServletContextImpl.SERVLETS_PACKAGE +
+ ".jsp.JasperCompilerTemplateClassMapper");
+ }
+
}
private void initDefaults() throws ServletException {
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/ServletResponseImpl.java
Sat Jun 14 08:41:23 2008
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.lite;
@@ -1054,21 +1053,39 @@
resB.setStatus(status);
resB.setMessage(message);
- // Now go over the error-page handling -
+ // Clear any data content that has been buffered
+ resetBuffer();
+
+ // Cause the response to be finished (from the application perspective)
String statusPage = req.getContext().findStatusPage(status);
-
+
if (statusPage != null) {
- req.getContext().handleStatusPage(req,
- this, status, statusPage);
+ req.getContext().handleStatusPage(req, this, status, statusPage);
} else {
- // Clear any data content that has been buffered
- resetBuffer();
+ // Send a default message body.
+ // TODO: maybe other mechanism to customize default.
+ defaultStatusPage(status, message);
+ }
+ setSuspended(true);
+ }
- // Cause the response to be finished (from the application
perspective)
- setSuspended(true);
+ /**
+ * Default handler for status code != 200
+ */
+ void defaultStatusPage(int status, String message)
+ throws IOException {
+ setContentType("text/html");
+ if (status > 400 && status < 600) {
+ if (getOutputBuffer().getBytesWritten() == 0) {
+ getOutputBuffer().write("<html><body><h1>Status: " +
+ status + "</h1><h1>Message: " + message +
+ "</h1></body></html>");
+ getOutputBuffer().flush();
+ }
}
}
+
/**
* Send a temporary redirect to the specified redirect location URL.
Modified: tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java
(original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLite.java Sat
Jun 14 08:41:23 2008
@@ -1,4 +1,18 @@
/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.tomcat.lite;
@@ -27,8 +41,6 @@
import org.apache.coyote.Response;
import org.apache.coyote.adapters.CoyoteServer;
import org.apache.coyote.adapters.MapperAdapter;
-import org.apache.tomcat.servlets.addon.AddonSupport;
-import org.apache.tomcat.servlets.addon.UserTemplateClassMapper;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.http.mapper.MappingData;
@@ -42,11 +54,10 @@
* @author Costin Manolache
*/
public class TomcatLite implements Adapter {
- private static TomcatLite facade = new TomcatLite();
private String serverDirName;
private File workDir;
- private int port = 8003;
+ private int port = 8080;
// all contexts - hostMapper knows about hostnames and how they are mapped.
// this shouldn't be needed if we want to delegate ctx management
@@ -62,15 +73,16 @@
Map<String,String> preloadMappings = new HashMap();
Map<String,String> ctxDefaultInitParam = new HashMap();
- CoyoteServer coyote = new CoyoteServer();
+ CoyoteServer coyote;
protected boolean daemon = false;
- private TomcatLite() {
+ public TomcatLite(CoyoteServer server) {
+ this.coyote = server;
}
- public static TomcatLite getServletImpl() {
- return facade;
+ public TomcatLite() {
+ coyote = new CoyoteServer();
}
// --------------- start/stop ---------------
@@ -141,15 +153,6 @@
addServletContext("", pathDir[1], pathDir[0]);
}
- public void setJspCompiler(boolean b) {
- addDefaultInitParam(AddonSupport.ADDON_PREFIX +
- UserTemplateClassMapper.class.getSimpleName(),
- ServletContextImpl.SERVLETS_PACKAGE +
- ".jsp.JasperCompilerTemplateClassMapper");
- setPreload("jsp:" + ServletContextImpl.SERVLETS_PACKAGE +
- ".jsp.JspCompileServlet");
- }
-
public void setPreload(String servletNameClass) {
String[] nv = servletNameClass.split(":");
preloadServlets.put(nv[0], nv[1]);
@@ -206,12 +209,14 @@
*
* @param hostname - ""
* if default host, or string to be matched with Host header
+ * @param basePath = directory where the webapp is installed
* @param path -
* context path, "/" for root, "/examples", etc
* @return a servlet context
* @throws ServletException
*/
- public ServletContext addServletContext(String hostname, String basePath,
+ public ServletContext addServletContext(String hostname,
+ String basePath,
String path)
throws ServletException
{
@@ -384,12 +389,17 @@
// servlet completed without exception. Check status
int status = res.getStatus();
- String statusPage = ctx.findStatusPage(status);
-
- if (statusPage != null) {
- ctx.handleStatusPage(req, res, status, statusPage);
+ if (status != 200 && !res.isCommitted()) {
+ String statusPage = ctx.findStatusPage(status);
+
+ if (statusPage != null) {
+ ctx.handleStatusPage(req, res, status, statusPage);
+ } else {
+ // Send a default message body.
+ // TODO: maybe other mechanism to customize default.
+ res.defaultStatusPage(status, res.getMessage());
+ }
}
-
} catch (Throwable t) {
ctx.handleError(req, res, t);
} finally {
@@ -439,7 +449,7 @@
}
/**
- * Init using cached tomcatLite.ser
+ * Init
*
* @throws ServletException
* @throws IOException
@@ -483,7 +493,7 @@
// At this point all config is loaded. Contexts are not yet init()
// - this will happen on start.
- System.err.println("Engine.init() " + (t1-t0));
+ System.err.println("Context.init() " + path + " " + (t1-t0));
}
public ServletRequestImpl createMessage(String uri,
@@ -605,6 +615,9 @@
service(sreq, sres);
if (res.getNote(CoyoteServer.COMET_RES_NOTE) == null) {
+ if (!sres.isCommitted()) {
+ res.sendHeaders();
+ }
sres.outputBuffer.flush();
res.finish();
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java
(original)
+++ tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/lite/TomcatLiteMain.java
Sat Jun 14 08:41:23 2008
@@ -1,4 +1,18 @@
/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.tomcat.lite;
@@ -19,7 +33,7 @@
public static void main(String args[])
throws Exception {
- TomcatLite lite = TomcatLite.getServletImpl();
+ TomcatLite lite = new TomcatLite();
// TODO: collect all args into a properties file,
// have them applied to web.xml params.
// format: webapp.servletname.param=value
@@ -28,6 +42,8 @@
// TODO: integrate this with JMX
IntrospectionUtils.processArgs(lite, args);
+ IntrospectionUtils.processArgs(lite.coyote, args);
+
lite.init();
lite.start();
lite.startConnector();
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/AddonSupport.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/AddonSupport.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/AddonSupport.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/AddonSupport.java
Sat Jun 14 08:41:23 2008
@@ -1,4 +1,18 @@
/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
package org.apache.tomcat.servlets.addon;
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/UserTemplateClassMapper.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/UserTemplateClassMapper.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/UserTemplateClassMapper.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/addon/UserTemplateClassMapper.java
Sat Jun 14 08:41:23 2008
@@ -25,10 +25,17 @@
*/
public interface UserTemplateClassMapper {
+ /**
+ * Generate and load the proxy corresponding to the template file.
+ *
+ */
public Servlet loadProxy(String jspFile,
- ServletContext ctx,
- ServletConfig config) throws ServletException;
-
- public String getClassName(String templateName);
-
+ ServletContext ctx,
+ ServletConfig config) throws ServletException;
+
+ /**
+ * Quick check if the template ( or deps ) has been modified
+ * and the servlet needs to be regenerated;
+ */
+ public boolean needsReload(String jspFile, Servlet s);
}
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/Dir2Html.java
Sat Jun 14 08:41:23 2008
@@ -1,46 +1,33 @@
/*
- * Copyright 1999,2004-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.servlets.file;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
-import java.io.Reader;
import java.io.StringWriter;
-import java.text.SimpleDateFormat;
import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/file/WebdavServlet.java
Sat Jun 14 08:41:23 2008
@@ -1,20 +1,19 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.servlets.file;
@@ -35,16 +34,14 @@
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.tomcat.servlets.util.UrlUtils;
-import org.apache.tomcat.util.http.FastHttpDateFormat;
import org.apache.tomcat.servlets.util.Range;
import org.apache.tomcat.servlets.util.RequestUtil;
-
+import org.apache.tomcat.servlets.util.UrlUtils;
+import org.apache.tomcat.util.http.FastHttpDateFormat;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspFileTemplateServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspFileTemplateServlet.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspFileTemplateServlet.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/JspFileTemplateServlet.java
Sat Jun 14 08:41:23 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.tomcat.servlets.jsp;
import java.io.IOException;
@@ -55,6 +71,7 @@
// exception will be thrown if not set properly
realJspServlet = mapper.loadProxy(jspFile, getServletContext(),
config);
+ realJspServlet.init(config);
}
public void setJspFile(String jspFile) {
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SimpleTemplateClassMapper.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SimpleTemplateClassMapper.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SimpleTemplateClassMapper.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/SimpleTemplateClassMapper.java
Sat Jun 14 08:41:23 2008
@@ -72,6 +72,9 @@
return jsp;
}
+ public boolean needsReload(String jspFile, Servlet s) {
+ return false;
+ }
protected Servlet compileAndInitPage(ServletContext ctx,
String jspUri,
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/WildcardTemplateServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/WildcardTemplateServlet.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/WildcardTemplateServlet.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/jsp/WildcardTemplateServlet.java
Sat Jun 14 08:41:23 2008
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package org.apache.tomcat.servlets.jsp;
import java.io.IOException;
@@ -72,6 +88,9 @@
// now we should have jspUri == the path to the jsp.
Servlet realJspServlet = jsps.get(jspPath);
+
+ // TODO: support reload
+
if (realJspServlet == null) {
realJspServlet = mapper.loadProxy(jspPath,
getServletContext(), getServletConfig());
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/sec/DigestAuthServlet.java
Sat Jun 14 08:41:23 2008
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,8 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.servlets.sec;
@@ -178,7 +177,7 @@
*
* @param request HTTP servlet request
* @param authorization Authorization credentials from this request
- * @param realm Realm used to authenticate Principals
+ * @param defaultRealm Realm used to authenticate Principals
*/
protected Principal processDigestHeader(HttpServletRequest request,
String authorization) {
Modified:
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java
URL:
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java?rev=667818&r1=667817&r2=667818&view=diff
==============================================================================
---
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java
(original)
+++
tomcat/sandbox/tomcat-lite/java/org/apache/tomcat/servlets/util/Enumerator.java
Sat Jun 14 08:41:23 2008
@@ -1,9 +1,10 @@
/*
- * Copyright 1999,2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -13,16 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.tomcat.servlets.util;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
-import java.util.ArrayList;
import java.util.Map;
import java.util.NoSuchElementException;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]