Question

For a plugin which I created I want to add a webinterface from which you can change settings and do some simple data manipulation. This data manipulation should be done trough sqlquerys. I am using a sqlite database and this is where the problem starts:

The website(servlet) has to share a database connection with the rest of the plugin to prevent "data base is locked" errors and keep data integrity.

I already tried to embed jetty and tomcat, but I had no clue how to integrate a website into the jar.

PS: I won't switch to mysql. Also as the website is just an administration interface it doesn't have that much accesses and solutions without using servlets or jsps are very welcome, although it has to support buttons and login (ajax ??)

Was it helpful?

Solution

For really simple admin/debug/monitoring interfaces, I've sometimes used the built in HTTP server in the Oracle/OpenJDK JVM.

It's about as lightweight as you can get, being built in. But is not portable across JVMs other than Oracle/OpenJDK. Not being portable, I'd only recommend it for a debug interface or similar.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top