* SusiMail: Fix classpath problem when started manually (ticket #957)

- Remove a couple of dependencies
   - Add jetty-util.jar to console classpath just in case
This commit is contained in:
zzz
2013-06-17 19:39:21 +00:00
parent 36e898d668
commit f9f1391057
3 changed files with 11 additions and 7 deletions

View File

@ -106,7 +106,7 @@
<!-- DTG added in 0.8.4, not in the classpath for very old installs, before we changed wrapper.config to specify * -->
<!-- very old installs don't have i2psnark,jstl,standard in the classpath... not added in WebAppConfiguration any more -->
<!-- All new jetty 7 jars should have been in 0.9.6, added in 0.9.7 -->
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-webapp.jar" />
<attribute name="Class-Path" value="i2p.jar router.jar jrobin.jar desktopgui.jar i2psnark.jar jstl.jar standard.jar jetty-continuation.jar jetty-http.jar jetty-io.jar jetty-security.jar jetty-servlet.jar jetty-servlets.jar jetty-util.jar jetty-webapp.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />

View File

@ -88,7 +88,11 @@ public class WebAppConfiguration implements Configuration {
File dir = libDir;
String cp;
if (pluginDir.exists()) {
if (ctxPath.equals("/susimail")) {
// Ticket #957... don't know why...
// Only really required if started manually, but we don't know that from here
cp = "jetty-util.jar";
} else if (pluginDir.exists()) {
File consoleDir = new File(pluginDir, "console");
Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
@ -123,6 +127,8 @@ public class WebAppConfiguration implements Configuration {
if (systemCP.contains(jfile.toURI().toURL()) ||
(jdir != null && systemCP.contains(jdir.toURI().toURL()))) {
//System.err.println("Not adding " + path + " to classpath for " + appName + ", already in system classpath");
// Ticket #957... don't know why...
if (!ctxPath.equals("/susimail"))
continue;
}
System.err.println("Adding " + path + " to classpath for " + appName);

View File

@ -29,9 +29,7 @@ import javax.servlet.http.HttpServletRequest;
//import org.apache.commons.logging.Log;
//import org.mortbay.log.LogFactory;
import org.eclipse.jetty.http.HttpHeaders;
import org.eclipse.jetty.util.MultiMap;
import org.eclipse.jetty.util.StringUtil;
import org.mortbay.util.LineInput;
/* ------------------------------------------------------------ */
@ -78,7 +76,7 @@ public class MultiPartRequest
throws IOException
{
_request=request;
String content_type = request.getHeader(HttpHeaders.CONTENT_TYPE);
String content_type = request.getHeader("Content-Type");
if (!content_type.startsWith("multipart/form-data"))
throw new IOException("Not multipart/form-data request");
@ -94,7 +92,7 @@ public class MultiPartRequest
value(content_type.substring(content_type.indexOf("boundary=")));
//if(log.isDebugEnabled())log.debug("Boundary="+_boundary);
_byteBoundary= (_boundary+"--").getBytes(StringUtil.__ISO_8859_1);
_byteBoundary= (_boundary+"--").getBytes("ISO-8859-1");
loadAllParts();
}