This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Nikhil Kumar

Greenhorn
+ Follow
since Dec 17, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nikhil Kumar

I am using the SDK JAXP implementation of DOM to parse a simple XML document containing a !DOCTYPE tag, make a minor modification and write it back to a file. All works fine except that the !DOCTYPE tag is not written to the StreamResult by the Transformer.
getDoctype() on the Document does return a Doctype object that was parsed, but it's not written when transforming the Document into a StreamResult.
How do I write the !DOCTYPE tag into the output?
Please help.
Nikhil
17 years ago
I am trying to POST a request using HttpURLConnection and am using a packet sniffer to look at the actual HTTP request being sent to the server.
Just where the content is supposed to begin (after content-length line), I see a 70-char 'junk'. Can someone please help me understand the 70-char 'junk' that apparently HttpURLConnection is writing into the HTTP request between the HTTP message header and the content.
POST http://java.sun.com/cgi-bin/backwards HTTP/1.1
User-Agent: Java/1.4.1_01
Host: java.sun.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 20
`W?� J J ^
G�m� E <M�@ ���
�)����h�p�P��x�P�q�� string=NikhilKumar
Nagendra,
Be assured the intention is noble.
All I want to do is see my own requests being sent to a HTTPS server. I write the request using the OutputStream of a HttpURLConnection. But what I write into the OutputStream is only a part of the request that is finally sent to the server, because HttpURLConnection prefixes it with the HTTP header etc. That's the part I am more interested in, in order to interpret the server response that I receive.
Is there a way to somehow get the ServerSocket that HttpURLConnection is using, or some such stunt? The task is to be able to read your own HTTPS request stream that you send to the server. Gurus....
I am using a packet sniffer to view TCP data streams. It works pretty well for HTTP requests. However, for HTTPS requests (SSL), the data in the packets (that I can see through the sniffer) is encrypted. How do I collaborate with the Browser (where the encryption/decryption keys are stored) to see the decrypted/unencrypted code?
It seems too much of work to manually assemble the encrypted data from different packets and then try to decrypt it somehow.
What's the right approach to see/sniff unencrypted HTTPS Streams? It appears to me to be outside the realm of packet sniffers because data in SSL packets is already encrypted before packets are constructed.
Networking Gurus please help.
I am trying to work with a java.net.HttpURLConnection object on a http:// url. The JVM runs behind a firewall. I do get a response code of 200 (OK), but only 'sometimes'. Most of the times I get a "HTTP/1.1 407 Proxy Authorization Required" message.
Also, if I use a https:// url, I get the same 407 message.
Can anyone explain this inconsistency? Please help.
-Nikhil
I need to "post an xml document to a https://... address". What do I do?
I tried opening a URLConnection and doing a getOutputStream(), and then writing the xml document into this OutputStream. Is this the correct approach?
If not, how do I need to proceed?
If the approach is correct, my getOutputStream() is failing with a "HTTP Response Code 407 Proxy Authorization Required". I have already set the https.proxyHost and https.proxyPort properties correctly and did a setDoOutput(true) on the URLConnection before doing the getOutputStream(). My Java Plug-in also points to get the proxy details from Browser Settings. What else do I need to do to make it work?
Please help.
Nikhil
17 years ago
Where can I find javadoc for com.sun.* packages? In particular, I am looking for documentation on com.sun.xml.rpc.client package.
It is often very confusing as to what packages belong where. Is there a way to locate a package and its javadoc given its name?
Will appreciate your help.
Nikhil
17 years ago
I thought 40-hours is just a metaphor meaning work only planned hours. If you need more hours, you underestimated, and there is something wrong somewhere in the process, which needs to be corrected before getting into a similar situation in the future. Or does 40-hours mean 40 hours? Please opine.
The thread is so interesting, I couldn't help opining.
Passing parameters by value, reference or name is a programming language semantics. Here is a language independent representation.
Procedure Declaration:
declare myProcedure with parameter X
Procedure Call:
call myProcedure using A
Following can happen depending on the way parameter passing is implemented in a programming language:
pass-by-value:
After the call to it, the procedure will have the value of A in X.
pass-by-reference:
After the call to it, the procedure will have a reference to A in X.
pass-by-name:
After the call to it, the procedure will have the name of A in X.

In Java, the language specification requires implementation of parameter passing using pass-by-value semantics.
Let's not confuse pass-by-reference with passing object-reference. We are talking about apples and oranges here. It helps to think that, what is contained in A is a handle to the object, not necessarily a pointer or a direct reference. It is the value of A i.e. a copy of the handle that gets passed to the procedure. The variable X in the procedure contains a copy of this handle.
Hope that brings the thread a little closer to closure.
Thanks,
Nikhil.
19 years ago