This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
This is a mixed-topic question (part HTTP, part Servlet, part J2ME) but I figured this forum is the best one to post in.
Anyhow, I have a MIDP app that regularly talks with a Servlet that is running on the Orion app server. Occasionally, information changes on the server, and that info needs to be synched in the MIDlet. So in such a situation, when the MIDlet pings the server, I pass a custom HTTP response header during the response to the MIDlet to tell it to change some internal value. Works like a champ.
In fact, this approach works so well that I want to expand its use, so that anytime a user makes a data entry/deletion/modification on the Web site (the Orion app server), that entry/deletion/modification gets sent as a header to the MIDlet. My concern is that, if the user decides to go hog-wild on the Web site in between MIDlet pings to the server, there could wind up being a lot of response headers that I need to send back to the MIDlet once it does ping. So my question: is there a hard limit to the number of HTTP headers that can be sent in an HTTP response? Or some theoretical limit? I'm looking online to see if I can find some limit defined either in the HTTP protocol, Servlet spec, or MIDP spec, but I can't find an answer either way.
Thanks in advance! [ February 09, 2005: Message edited by: dave taubler ]
Dave Taubler<br />Specializing in <a href="http://taubler.com/articles/" target="_blank" rel="nofollow">Java and Web Development</a>
I assume you are using HTTP 1.1, and doing several requests in the same connection.
HTTP does not define a limit, but your webserver does, for example apache in its configuration has something about how many requests could be made in the same connection, and how much idle time until he disconnects the client, I have not seen something similar in Orion.
Either way relying on this would be a bad idea since the webserver can change, it would be better if your midlet were smart enough to "reconnect" to the server in the event that his connection has been closed because of too many requests.
Joined: May 15, 2001
Actually, I'm talking about a single request in this case, in which I would be adding multiple headers via
I'm just curious as to whether there is a max number of headers I can expect to successfully set in that manner.