Looks like its working as designed to me ...
http://slova.de/hello-world-0.1-SNAPSHOT/hello/
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>
Joakim Erdfelt / [email protected]
On Wed, Jun 29, 2016 at 12:39 PM, Alexander Farber <
[email protected]> wrote:
> Hi Joakim, thanks for the reply, but -
>
> On Wed, Jun 29, 2016 at 9:17 PM, Joakim Erdfelt <[email protected]>
> wrote:
>
>> You haven't specified a contextPath on your webapp, so its using the
>> filename.
>>
>> See this ...
>>
>> INFO:oejsh.ContextHandler:Scanner-0: Started
>> o.e.j.w.WebAppContext@782f68f1
>> {/hello-world-0.1-SNAPSHOT,file:///tmp/jetty-127.0.0.1-8080-hello-world-0.1-SNAPSHOT.war-_hello-world-0.1-SNAPSHOT-any-5435869185806793118.dir/webapp/,AVAILABLE}{/hello-world-0.1-SNAPSHOT.war}
>>
>>
>> That tells you the contextPath it chose is "/hello-world-0.1-SNAPSHOT"
>>
>> So using http://slova.de/hello-world-0.1-SNAPSHOT would work.
>>
>> On Wed, Jun 29, 2016 at 12:03 PM, Alexander Farber <
>> [email protected]> wrote:
>>
>>>
>>> .... I have followed
>>> https://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html
>>> and created JettyMavenHelloWarApp Maven project, which has successfully
>>> produced the WAR-file hello-world-0.1-SNAPSHOT.war
>>>
>>> When I run it with "mvn jetty:run" on my Macbook it works well and I can
>>> browse to http://127.0.0.1:8080/hello
>>>
>>> But when I copy the WAR-file into $JETTY_BASE/webapps/ dir on my Linux
>>> server I see successful deployment in the Jetty log:
>>>
>>> INFO:oejs.Server:main: Started @371ms
>>> INFO:oejw.StandardDescriptorProcessor:Scanner-0: NO JSP Support for
>>> /hello-world-0.1-SNAPSHOT, did not find
>>> org.eclipse.jetty.jsp.JettyJspServlet
>>> INFO:oejsh.ContextHandler:Scanner-0: Started
>>> o.e.j.w.WebAppContext@782f68f1
>>> {/hello-world-0.1-SNAPSHOT,file:///tmp/jetty-127.0.0.1-8080-hello-world-0.1-SNAPSHOT.war-_hello-world-0.1-SNAPSHOT-any-5435869185806793118.dir/webapp/,AVAILABLE}{/hello-world-0.1-SNAPSHOT.war}
>>>
>>>
>>> but when I browse to http://slova.de/hello - it seems to be obscured by
>>> the FastCGIProxyServlet and I see a "404 page" of Wordpress.
>>>
>>> How could I please change the priority here, so that "/hello" context
>>> resolves to the WAR-file?
>>>
>>>
> 1) It does not work- http://slova.de/hello-world-0.1-SNAPSHOT/ displays
> only a directory listing on the Linux server, while when I run that project
> with "mvn jetty:run" on MacBook and browse to http://127.0.0.1:8080/helo
> then the following is displayed:
>
> Hello Servlet
> session=1tvo98937440fc14liovytsb2
>
> 2) Also, I think I did specify the context for the WAR-file by having
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app
> xmlns="http://xmlns.jcp.org/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
> http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
> metadata-complete="false"
> version="3.1">
>
> <servlet>
> <servlet-name>Hello</servlet-name>
> <servlet-class>org.example.HelloServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>Hello</servlet-name>
> <url-pattern>/hello/*</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
> in the JettyMavenHelloWarApp/src/main/webapp/WEB-INF/web.xml fle - as
> suggested by the Jetty doc
> https://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html
>
> Regards
> Alex
>
>
> _______________________________________________
> jetty-users mailing list
> [email protected]
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users