开发者

How to deploy to jetty's container?

I have an application i can开发者_StackOverflow war up which i usually use with tomcat in an exploded-ear configuration.

How can i get it to work most painlessly with jetty? I am finding the documentation a bit ambiguous in this area.


Create a context file with the same name as your web application WAR file 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

Start Jetty from the command line by calling

java -jar start.jar

when in the home Jetty directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜