Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] JettyMavenHelloWarApp not found when deployed as .war (obscured by FastCGI)

Hello,

On Wed, Jun 29, 2016 at 10:25 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
Looks like its working as designed to me ...


I see the HelloServlet response.

Keep in mind your URL follows this general pattern ...

{scheme}://{host+port}/{contextPath}/{servlet-url-pattern}/{pathInfo}?{query}

So in your case ...

scheme = http
host+port = slova.de
contextPath = /hello-world-0.1-SNAPSHOT
servlet-url-pattern = /hello
pathInfo = <null>
query = <null>


I am confused, why the example works as http://127.0.0.1/hello when run by "mvn jetty:run" and at the same time same example has to be called as http://example.com/hello-world-0.1-SNAPSHOT/hello/ when copied as WAR-file into $JETTY/webapps

Why does the path change?

But my real question is what would be please the best way to specify a path like "/hello" (or "/ws") when developing a WAR-file?

I would like to develop my project in NetBeans and copy the produced WAR-file to the Linux-server (and maybe try to connect to it remotely as described at https://www.eclipse.org/jetty/documentation/9.3.x/enable-remote-debugging.html )

I have read https://www.eclipse.org/jetty/documentation/9.3.x/configuring-contexts.html#setting-context-path but I am still not sure, what would be the best method for specifying context (like "/hello" or "/ws") and vritual host for my WAR-file...

Best regards
Alex



Back to the top