I have a small built-in server that supports HTTPS using Spark. I also want to support / catch some HTTP calls; like a help page and some redirects.
For example, the help page:
http://localhost:8088/help .... renders .... http::8088//localhost/help.html
or login page:
http://localhost::8088/login ... renders .... https::8089//localhost/login.html
I went to the scene where I have an embedded server that responds with either HTTP xor HTTPS - one or the other, and not both together. Is it possible to respond to both protocols with the same integrated Jetty server (via Spark)? If not, is it possible to run two Jetty servers in the same embedded application? Can I run two Spark servers in one application? (I take it as a βreadβ that if Jetty doesn't do this, asking Spark for this service will be a dead end).
My preferred answer would be if I can use my Spark server to listen and process both protocols. So far, my research suggests that only one mode is possible, mainly because Spark is actually a static library that you can install only one port; and you can only have one Iskra server. Has anyone used the same port for HTTP and HTTPS? (It just doesn't seem to me βgoodβ).
I found Unit Test code that looked like it used both protocols, TestSparkUtil here:
API-. : () Jetty HTTP- HTTPS? ?
, . , , .