3 pièce(s) jointe(s)
déploiement et lancement de jetty pour un war représentant une application Java-angular
Bonjour,
j'ai un war que je veux déployer et lancer avec Jetty. C'est une application angular-Java que j'ai construit avec Eclipse-Maven
Voici le contenu de mon war (tourism-services.war) quand je l'extrais à part
Pièce jointe 435793
J'ai aussi téléchargé Jetty 9 sur mon MAC et voici un print screen de la hierarchie
Pièce jointe 435794
Comme vous pouvez le voir, à partir d'un post que j'ai trouvé sur internet (et dont je n'ai pas gardé la trace), j'ai mis mon war sous le répertoire webapps et j'ai créé un répertoire webapps.demo avec un fichier tourism-services.xml qui est le suivant
Pièce jointe 435798
A partir du post suivant (https://stackoverflow.com/questions/...answer-4744119), j'ai lancé la commande suivante
Code:
1 2 3
|
MBP-de-Admin:.m2 admin$ cd /Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830
MBP-de-Admin:jetty-distribution-9.4.12.v20180830 admin$ java -jar start.jar -Dwar.location=./webapps/tourism-services.war -DcontextPath=/tourism-services ./etc/jetty-http.xml |
Comme vous pouvez le voir, j'utilise jetty-http.xml ayant suivi les instructions de la page suivante : https://www.eclipse.org/jetty/docume...configure.html
Les logs ne montrent aucune erreurs
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Last login: Wed Dec 19 10:08:38 on console
Restored session: Dim 16 déc 2018 01:10:19 CET
.profile execute
MBP-de-Admin:.m2 admin$ cd /Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830
MBP-de-Admin:jetty-distribution-9.4.12.v20180830 admin$ java -jar start.jar -Dwar.location=./webapps/tourism-services.war -DcontextPath=/tourism-services ./etc/jetty-http.xml
WARN : System properties and/or JVM args set. Consider using --dry-run or --exec
2018-12-19 19:31:21.730:INFO::main: Logging initialized @956ms to org.eclipse.jetty.util.log.StdErrLog
2018-12-19 19:31:22.065:WARN:oejs.HomeBaseWarning:main: This instance of Jetty is not running from a separate {jetty.base} directory, this is not recommended. See documentation at http://www.eclipse.org/jetty/documentation/current/startup.html
2018-12-19 19:31:22.148:INFO:oejs.Server:main: jetty-9.4.12.v20180830; built: 2018-08-30T13:59:14.071Z; git: 27208684755d94a92186989f695db2d7b21ebc51; jvm 1.8.0_131-b11
2018-12-19 19:31:22.180:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:///Users/admin/Application-Marwen/Jetty/jetty-distribution-9.4.12.v20180830/webapps/] at interval 1
2018-12-19 19:31:25.029:WARN:oeja.AnnotationParser:main: Unknown asm implementation version, assuming version 393216
2018-12-19 19:31:25.757:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.AbstractTreeNode scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/AbstractTreeNode.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/AbstractTreeNode.class
2018-12-19 19:31:25.758:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.ContextCreationListener scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/ContextCreationListener.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/ContextCreationListener.class
2018-12-19 19:31:25.758:WARN:oeja.AnnotationParser:qtp705265961-15: org.terracotta.context.ContextElement scanned from multiple locations: jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-3.5.2.jar!/org/terracotta/context/ContextElement.class, jar:file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/WEB-INF/lib/ehcache-2.10.3.jar!/org/terracotta/context/ContextElement.class
........................
.........................
........................
19:31:30.170 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MapMultipartFormDataWriter. Using default ConstructorInjector.
19:31:30.175 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MultipartFormAnnotationReader. Using default ConstructorInjector.
19:31:30.178 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MultipartFormAnnotationWriter. Using default ConstructorInjector.
19:31:30.194 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MimeMultipartProvider. Using default ConstructorInjector.
19:31:30.198 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.MimeMultipartProvider. Using default ConstructorInjector.
19:31:30.199 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.XopWithMultipartRelatedReader. Using default ConstructorInjector.
19:31:30.200 [main] DEBUG org.jboss.resteasy.cdi.i18n - RESTEASY010575: No CDI beans found for class org.jboss.resteasy.plugins.providers.multipart.XopWithMultipartRelatedWriter. Using default ConstructorInjector.
19:31:30.212 [main] INFO org.jboss.weld.environment.servletWeldServlet - WELD-ENV-001009: org.jboss.weld.environment.servlet.Listener used for ServletRequest and HttpSession notifications
2018-12-19 19:31:30.291:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@2758fe70{Archetype Created Web Application,/tourism-services,file:///private/var/folders/cj/18nnbwrn68v72gpfnc09tpl80000gn/T/jetty-0.0.0.0-8080-tourism-services.war-_tourism-services-any-8018000225900899231.dir/webapp/,AVAILABLE}{/tourism-services.war}
2018-12-19 19:31:30.323:INFO:oejs.AbstractConnector:main: Started ServerConnector@e18d7ad{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2018-12-19 19:31:30.323:INFO:oejs.Server:main: Started @9550ms |
Mais cela ne mène nul part. J'ai 3 questions
1) d'abord dans le répertoire Jetty, je n'ai pas de répertoire et hierarchie d'extraction de mon fichier war
2) Quand je regarde dans mon browser à l'adresse suivante http://localhost:8080/tourism-services il n'y a rien. C'est probablement dû au fait que je n'ai pas d'extraction de mon war et aussi
3) au fait que je doive aussi démarrer mon application angular avec la commande -> ng serve --open sous le répertoire d'extraction (où est mon fichier index.html)