Platform: java 11, karaf 4.4.1, OSGi 8

I have a small karaf web whiteboard demo application that used to work,
that doesn't work anymore
 https://github.com/steinarb/frontend-karaf-demo

I need some useful tips for debugging this demo application.

I can debug into karaf, is there a place I could set a breakpoint to see
what the requests look like and where they end up?

Are there console commands I could use?

I have used service:list but what I see there looks normal:
 https://gist.github.com/steinarb/d6458984374474aff558a461e7fe1d83

What happens, is the following:

When I request
 http://localhost:8181/frontend-karaf-demo
I get a 302 to http://localhost:8181/frontend-karaf-demo/

But for http://localhost:8181/frontend-karaf-demo/ I just get 404.

And the 404 says that it comes from the default servlet, does that means
that it doesn't match the web context of the demo application?

Here's the 404 HTTP request response body:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404 Not Found</h2>
<table>
<tr><th>URI:</th><td>/frontend-karaf-demo/</td></tr>
<tr><th>STATUS:</th><td>404</td></tr>
<tr><th>MESSAGE:</th><td>Not Found</td></tr>
<tr><th>SERVLET:</th><td>default</td></tr>
</table>

</body>
</html>

The web context is defined like this:
 
https://github.com/steinarb/frontend-karaf-demo/blob/master/src/main/java/no/priv/bang/demos/frontendkarafdemo/FrontendDemoServletContextHelper.java#L8

The top servlet is defined like this
 
https://github.com/steinarb/frontend-karaf-demo/blob/master/src/main/java/no/priv/bang/demos/frontendkarafdemo/ReactServlet.java#L16

Am I doing something obviously wrong here?

Thanks!

Reply via email to