あなたの質問に答えるために、
What if the webapp is deployed but you dont know the name of the webapp,
because it´s different from the .war file name?
WAR を見つけることができなくなります。それと同じくらい簡単です。
あなたの質問とは関係ありませんが、これがどのように起こるかを詳しく説明しましょう。たとえば、依存関係の管理に Maven を使用する Web アプリケーションを考えてみましょう。
アプリケーションへのアクセスに使用できるアプリケーションの最終的な名前を設定するために指定できるタグがmavenにあります。
pom.xml
<groupId>com.test</groupId>
<artifactId>testWar</artifactId>
<name>testWar</name>
<packaging>war</packaging>
このコードは、maven にアプリケーションを としてビルドするように指示しますtestWar.war
。
以下を設定すると、アプリケーションへのアクセス方法を指定できるようになりました。
<finalName>mycontextpath</finalName>
次に、「展開」に finalName が使用され、次の方法で webapp にアクセスできます。
http://localhost:8080/mycontextpath/
デフォルトでは、ほとんどすべての Web サーバーartifactID
がデプロイメント パスとして使用されますがfinalName
、たとえばJetty
pluginを使用する場合などに使用するように指定できます。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<configuration>
<contextPath>${build.finalName}</contextPath>
</configuration>
</plugin>
それが役に立てば幸い。:)