I have an SQL database running. All the java interaction with it is clear.
Now I want to display the result of some queries (say SELECT * FROM example) and let the user make queries (DELETE FROM example) with a couple of buttons from within the browser.
What’s a not too complex way of doing that? My head is buzzing with words like JAX-WS, JSP, Servlets etc. Easiest way seems to be JSP, but I heard its deprecated and while doing this simple task I also want to learn something useful for the future 🙂
What would you recommend? Also, if you could point me to a good tutorial would be nice, because all the tutorials I found for Java webservices included writing a client, not using them from within the browser.
There are several ways of doing what you want, i’ll list a couple:
on the server side.
I’d recommend REST, and here you can find a tutorial.
On the client side, you’ll need to use javascript to send ajax requests.
I suggest you take a look at jquery, which is a javascript framework that would make your life much easier. here are some great resources for learning it.