forked from I2P_Developers/i2p.i2p
* 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:
@ -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 * -->
|
<!-- 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 -->
|
<!-- 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 -->
|
<!-- 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="Implementation-Version" value="${full.version}" />
|
||||||
<attribute name="Built-By" value="${build.built-by}" />
|
<attribute name="Built-By" value="${build.built-by}" />
|
||||||
<attribute name="Build-Date" value="${build.timestamp}" />
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
||||||
|
@ -88,7 +88,11 @@ public class WebAppConfiguration implements Configuration {
|
|||||||
|
|
||||||
File dir = libDir;
|
File dir = libDir;
|
||||||
String cp;
|
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");
|
File consoleDir = new File(pluginDir, "console");
|
||||||
Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
|
Properties props = RouterConsoleRunner.webAppProperties(consoleDir.getAbsolutePath());
|
||||||
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
|
cp = props.getProperty(RouterConsoleRunner.PREFIX + appName + CLASSPATH);
|
||||||
@ -123,7 +127,9 @@ public class WebAppConfiguration implements Configuration {
|
|||||||
if (systemCP.contains(jfile.toURI().toURL()) ||
|
if (systemCP.contains(jfile.toURI().toURL()) ||
|
||||||
(jdir != null && systemCP.contains(jdir.toURI().toURL()))) {
|
(jdir != null && systemCP.contains(jdir.toURI().toURL()))) {
|
||||||
//System.err.println("Not adding " + path + " to classpath for " + appName + ", already in system classpath");
|
//System.err.println("Not adding " + path + " to classpath for " + appName + ", already in system classpath");
|
||||||
continue;
|
// Ticket #957... don't know why...
|
||||||
|
if (!ctxPath.equals("/susimail"))
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
System.err.println("Adding " + path + " to classpath for " + appName);
|
System.err.println("Adding " + path + " to classpath for " + appName);
|
||||||
buf.append(path);
|
buf.append(path);
|
||||||
|
@ -29,9 +29,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
|
|
||||||
//import org.apache.commons.logging.Log;
|
//import org.apache.commons.logging.Log;
|
||||||
//import org.mortbay.log.LogFactory;
|
//import org.mortbay.log.LogFactory;
|
||||||
import org.eclipse.jetty.http.HttpHeaders;
|
|
||||||
import org.eclipse.jetty.util.MultiMap;
|
import org.eclipse.jetty.util.MultiMap;
|
||||||
import org.eclipse.jetty.util.StringUtil;
|
|
||||||
import org.mortbay.util.LineInput;
|
import org.mortbay.util.LineInput;
|
||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
@ -78,7 +76,7 @@ public class MultiPartRequest
|
|||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
_request=request;
|
_request=request;
|
||||||
String content_type = request.getHeader(HttpHeaders.CONTENT_TYPE);
|
String content_type = request.getHeader("Content-Type");
|
||||||
if (!content_type.startsWith("multipart/form-data"))
|
if (!content_type.startsWith("multipart/form-data"))
|
||||||
throw new IOException("Not multipart/form-data request");
|
throw new IOException("Not multipart/form-data request");
|
||||||
|
|
||||||
@ -94,7 +92,7 @@ public class MultiPartRequest
|
|||||||
value(content_type.substring(content_type.indexOf("boundary=")));
|
value(content_type.substring(content_type.indexOf("boundary=")));
|
||||||
|
|
||||||
//if(log.isDebugEnabled())log.debug("Boundary="+_boundary);
|
//if(log.isDebugEnabled())log.debug("Boundary="+_boundary);
|
||||||
_byteBoundary= (_boundary+"--").getBytes(StringUtil.__ISO_8859_1);
|
_byteBoundary= (_boundary+"--").getBytes("ISO-8859-1");
|
||||||
|
|
||||||
loadAllParts();
|
loadAllParts();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user