I have a servlet that recives http header information from a client program.
Now I have observed that when I assign a string value (including empty string ) in conn.addRequestProperty(), then the program works good. But, when I assign a null as any header value, then even the next header value displays a null even if I have assigned a value to it.
Here's a snippet from the client program:
A snippet from the servlet:
Can anybody help me in figuring out why this is happening ? I'm working on JDeveloper / Tomcat server.
What exactly are you trying to accomplish by setting the property to null? I would guess that you have broken the request header mechanism and an incomplete set of headers is sent - can you look at the actual headers transmitted with TCPMON or similar mechanism? Bill
Joined: Feb 14, 2006
Originally posted by William Brogden: What exactly are you trying to accomplish by setting the property to null?
Thanks for replying Bill. I am testing the application for all different values - which include all these: 1)assigning a string as value conn.addRequestProperty("file","abcd.xml"); 2)assinging an empty String as value conn.addRequestProperty("file",""); 3)assinging a null as value conn.addRequestProperty("file",null);
and the program is breaking down for the 3rd condition - showing null for next header value as well.