I wrote a java web server that fits in a single file less than 500 lines long. Very easy to understand, very easy to extend, very easy to embed into your own project. You can use it however you like with no restrictions. Attribution would be nice, but not required.
View/download here.
SSL is a pain because unless you get a trusted certificate you get really scary messages that will chase most users away, and trusted certificates cost a lot of money. However if you have a certificate or have a situation where you don't mind the scary warnings, then you can enable SSL by doing this:
Create a certificate and put it in a keystore. You can create a non-trusted certificate good for 6 months by using the keytool program in the SDK.
keytool -keystore default -genkey -alias default -keyalg RSA
Replace the code that creates the server
ss = new ServerSocket(port);with this
System.setProperty("javax.net.ssl.keyStore", "default");
System.setProperty("javax.net.ssl.keyStorePassword", "default");
ss = SSLServerSocketFactory.getDefault().createServerSocket(port);
where you of course replace 'default' with the correct keystore location and keystore password