There is a Socket proxy that comes with leJOS NXT. You run nxjsocketproxy on the PC. On the NXT you need to wait for a Bluetooth connection (from the proxy) and then call NXTSocketProxy specifying the port you want to listen on and the BTConnection object. See the SocketTest sample, although that sample uses NXTSocket, not NXTServerSocket. Once you have establlished a server socket, you can wait for connections by calling accept which returns a NXTSocket object and you can then read and write data. On the PC connect your browser to
http://localhost:port. Your socket on the NXT will then receive http request and can return http responses. You will need to parse http yourself.
I will see if I can write a new sample that does this.
I wrote the http server API on the RCX, but have not ported it to the NXT. I could implement the same API as on the RCX, if there is a demand for it.