dk.netarkivet.wayback
Class WaybackWebServer
java.lang.Object
dk.netarkivet.wayback.WaybackWebServer
- All Implemented Interfaces:
- CleanupIF
public class WaybackWebServer
- extends java.lang.Object
- implements CleanupIF
Experimental code to launch wayback with Jetty.
This assumes the presence of the ROOT.war file in the netarchivesuite root dir.
Generated using the ant script "wayback.build.xml" with its "warfile" target
This script assumes that wayback-1.4.2 has been downloaded and the directory "examples/wayback" copied to "conf"
This launcher currently fails with an internal Jetty error: Path must not be null
19-Feb-2010 11:28:27 dk.netarkivet.common.webinterface.WaybackWebServer addWebApplication
INFO: The web application '/home/svc/workspace/netarchivesuite/ROOT.war' is now deployed at '/ROOT'
19-Feb-2010 11:28:30 org.slf4j.impl.JCLLoggerAdapter warn
WARNING: failed RequestFilter: java.lang.IllegalArgumentException: Path must not be null
19-Feb-2010 11:28:30 org.slf4j.impl.JCLLoggerAdapter error
SEVERE: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@11410e5{/ROOT,/home/svc/workspace/netarchivesuit
e/ROOT.war}
java.lang.IllegalArgumentException: Path must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.core.io.FileSystemResource.(FileSystemResource.java:59)
at org.archive.wayback.webapp.RequestMapper.(RequestMapper.java:75)
at org.archive.wayback.webapp.RequestFilter.init(RequestFilter.java:59)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at dk.netarkivet.common.webinterface.WaybackWebServer.startServer(WaybackWebServer.java:178)
at dk.netarkivet.common.webinterface.WaybackWebServer.getInstance(WaybackWebServer.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at dk.netarkivet.common.utils.ApplicationUtils.startApp(ApplicationUtils.java:168)
at dk.netarkivet.common.webinterface.WaybackApplication.main(WaybackApplication.java:38)
19-Feb-2010 11:28:30 dk.netarkivet.common.utils.ApplicationUtils startApp
FINEST: Factory method invoked.
19-Feb-2010 11:28:30 dk.netarkivet.common.utils.ApplicationUtils startApp
FINEST: Adding shutdown hook for dk.netarkivet.common.webinterface.WaybackWebServer
19-Feb-2010 11:28:30 dk.netarkivet.common.utils.ApplicationUtils startApp
FINEST: Added shutdown hook for dk.netarkivet.common.webinterface.WaybackWebServer
Constructor Summary |
protected |
WaybackWebServer()
Initialises a Wayback Web Server and adds the wayback application. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
static WaybackWebServer instance
- The unique instance of this class.
WaybackWebServer
protected WaybackWebServer()
- Initialises a Wayback Web Server and adds the wayback application.
Reads the port in the CommonSettings.HTTP_PORT_NUMBER.
TODO change to CommonSettings.WAYBACK_PORT_NUMBER
- Throws:
IOFailure
- on trouble starting server.
getInstance
public static WaybackWebServer getInstance()
- Returns the unique instance of this class. If instance is new, starts a
Wayback web server.
- Returns:
- the instance
startServer
public void startServer()
- Starts the jsp web server.
- Throws:
IOFailure
- if the server for any reason cannot be started.
cleanup
public void cleanup()
- Closes the GUI webserver, and nullifies this instance.
- Specified by:
cleanup
in interface CleanupIF