hapi-server / server-java

Java-based server which works with Java-based web servers like Tomcat
Apache License 2.0
0 stars 1 forks source link

HTML landing page needs to catch exceptions and skip as it shows first twenty #8

Open jbfaden opened 2 years ago

jbfaden commented 2 years ago

The HTML landing page shows the first twenty or so datasets, including the parameters found in each set. This needs to be done using a try/catch as we found when any of the info requests cause a runtime error, the entire page is broken. Instead a try/catch should be used on each one and a string indicating the problem displayed so that the problem can be investigated.

jbfaden commented 2 years ago

I've made it so the error is caught and indicated on the landing page: image

We'll need some sort of way that server hosts can configure if this is displayed or not.

rweigel commented 2 years ago

What about using https://github.com/hapi-server/server-ui ?

jbfaden commented 2 years ago

That's an interesting idea. The server would have to be installed and publically accessible, which is not going to be the case initially. But I agree that the final version should be aware of its install location and link over to the server-ui area.

rweigel commented 2 years ago

The server would have to be installed and publically accessible, which is not going to be the case initially.

I use it for localhost testing without issue. I just updated the README in an attempt to clarify this.

jbfaden commented 2 years ago

So I think I'll add a configuration for the server's location, which might just be http://localhost:8080/HapiServer/hapi during development, and then I'll add the link to the verifier when it has the link. I remember that you can do this with the verifier, too, and for trusted clients I can show that link as well.

rweigel commented 2 years ago

If http://localhost:8080/HapiServer/](http://localhost:8080/HapiServer returns the landing page, just put hapi as the one and only line in all.txt and it will work if opened in localhost or otherwise.

You can install the verifier locally for testing on localhost.