I thought I might have known a way to do that, but the code is in the hands of a previous employer and I can't find anything. I do know that the
Java environment is supplying headers itself -- which turned out to be very useful, since one of the headers sent silently is the cookie that identifies the user session.
Headers are intended for use by the client and server containers, and I could see Sun actually forbidding user-defined headers to prevent "spoofed" client info. Is a header really what you need, or could it be done via a URI parameter?
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.