This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
Hello there, The request to my servlet, can have no HTTP headers. In this case I should add HTTP headers before sending it to the servlet. Also the response coming from the servlet should be stripped down of the HTTP header's before leaving the server. Heard that filters can be used for this purpose. Someone please shed more light on how to do it. Zafer
It's probably not a good idea to be dependent on the absence of HTTP headers either coming or going. They're there for a reason. If your client is a Java client, you can do the next best thing - contact the server with an HttpURLRequest and simply ignore the headers - which you won't even see. On the other hand, if you truly need a protocol that is like HTTP but without headers, you should write your servlet using the non-HTTP Servlet base class (which itself serves as the base class for HttpServlet). You'll also have to configure your container to use a non-HTTP conduit, and the details of this you'll need to get from the docs specific to your appserver. Just as a reminder, you can't use this technique to attempt to wrench the servlet architecture into behaving like a client/server system. As long as it's a servlet, it's still contrained to strict request-response communications whether it uses HTTP or not.
Customer surveys are for companies who didn't pay proper attention to begin with.