Pregunta

I'm using maven and jetty for my web application. I give the command mvn jetty:run to run the maven/jetty which also will load my web application. But the path I get to use to access is http://localhost:8080/filename.jsp while I want it to be http://localhost:8080/myappname/filename.jsp

How to get this done ? Please let me know if I've to post specific files from my web app for you to be able to solve this.

I found other way around at Remove application name after localhost in jetty

¿Fue útil?

Solución

From these docs: http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#jetty-run-goal

I think you just need to configure the contextPath in your pom.xml:

<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <configuration>
    <scanIntervalSeconds>10</scanIntervalSeconds>
    <webApp>
      <contextPath>/test</contextPath>
    </webApp>
  </configuration>
</plugin>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top