How to deploy a container for a berth?

I have an application that I can run that I usually use with tomcat in a diversity ear configuration.

How can I make it work painlessly with the pier? I find the documentation a bit ambiguous in this area.

+4
source share
1 answer

Create a context file with the same name as the WAR file of your web application inside the $JETTY_HOME/contexts directory.

test.xml

 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd"> <configure class="org.eclipse.jetty.webapp.WebAppContext"> <set name="contextPath">/test</set> <set name="war"><systemproperty name="jetty.home" default="."/>/webapps/test.war</set> </configure> 

Put your WAR file in $JETTY_HOME/webapps/test.war

Launch Jetty from the command line by calling

 java -jar start.jar 

when in the Jetty home directory.

+4
source

Source: https://habr.com/ru/post/1314642/


All Articles