Hi There!
This most probably is obvious, but these are my first minutes / hours with b4J.
I am trying to delve into my first project, by creating a webserver, based on ServerHelloWorld example from some years ago.
I got a question:
1) It seems that the document for root URL "/" (http://localhost:8888/) is hardwired into a static file index.html I should place in the folder declared by StaticFilesFolder. If I set StaticFilesFolder into /objects/www and place an index.html inside, then it gets served OK as response for the "/" URL.
If I try to use AddHandler in order to have a Server Handler class module take care of the "/", I get the following error: java.lang.IllegalStateException: Multiple servlets map to path /: anywheresoftware.b4j.object.JServlet-282ba1e[mapped:EMBEDDED:null],org.eclipse.jetty.servlet.DefaultServlet-326de728[mapped:EMBEDDED:null]
Is there any way of programmatically handling the root url "/" ?
Regards,
Enrique
This most probably is obvious, but these are my first minutes / hours with b4J.
I am trying to delve into my first project, by creating a webserver, based on ServerHelloWorld example from some years ago.
I got a question:
1) It seems that the document for root URL "/" (http://localhost:8888/) is hardwired into a static file index.html I should place in the folder declared by StaticFilesFolder. If I set StaticFilesFolder into /objects/www and place an index.html inside, then it gets served OK as response for the "/" URL.
If I try to use AddHandler in order to have a Server Handler class module take care of the "/", I get the following error: java.lang.IllegalStateException: Multiple servlets map to path /: anywheresoftware.b4j.object.JServlet-282ba1e[mapped:EMBEDDED:null],org.eclipse.jetty.servlet.DefaultServlet-326de728[mapped:EMBEDDED:null]
Is there any way of programmatically handling the root url "/" ?
Regards,
Enrique
Last edited: