Olá
Eu precisava iniciar o Jetty através de um outro programa Java. Isso é possivel?
Aplicação iniciar o Jetty
3 Respostas
Olha aqui:
Obrigado.
Fui tentar fazer o que o CV colocou no post mas deu erro bacana:
0 [main] INFO http.HttpServer - Starting Jetty/5.0.RC1
31 [main] INFO util.FileResource - Checking Resource aliases
156 [main] WARN xml.XmlParser - Schema validation may not be supported:
org.xml.sax.SAXNotRecognizedException: Feature: http://apache.org/xml/features/validation/schema
......
org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:385)
at org.mortbay.http.HttpServer.start(HttpServer.java:678)
at IniciarJetty.main(IniciarJetty.java:34)
219 [main] WARN xml.XmlParser - WARNING@null line:22 col:-1 : org.xml.sax.SAXParseException: Valid documents must have a <!DOCTYPE declaration.
219 [main] WARN xml.XmlParser - ERROR@null line:22 col:-1 : .....
"locale-encoding-mapping-list" is not declared.
313 [main] WARN xml.XmlParser - ERROR@null line:310 col:-1 : org.xml.sax.SAXParseException: Element type "locale-encoding-mapping" is not declared.
313 [main] WARN xml.XmlParser - ERROR@null line:310 col:-1 : org.xml.sax.SAXParseException: Element type "locale" is not declared.
313 [main] WARN xml.XmlParser - ERROR@null line:310 col:-1 : org.xml.sax.SAXParseException: Element type "encoding" is not declared.
329 [main] WARN servlet.WebApplicationContext - Configuration error on C:/jetty-5.0.RC1/demo/webapps/jetty/
org.xml.sax.SAXParseException: Element type "web-app" is not declared.
....
360 [main] WARN util.ThreadedServer - Failed to start: [email protected]:8080
Multiple exceptions
Agora eu tentei com o jetty 4.2.21 e funcionou certinho.