Love all, trust a few, do wrong to none.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:@Mathur: I am currently working on a project where few pages will be loaded from already existing applications.
I think I got the solution, hope this should work. It is to remove the url to be screened from my proxy server. Wrote a mail to our admin. Request still in process. Don't know whether this fix will work or not.
What do you guys say? any ideas?
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:I would also like to know whether this problem has something to do with the VM parameters. Can I place my proxy id and password in the VM parameters list and try streaming the page? I read about the same kind of problem in a post here
http://support.sas.com/kb/16/958.html
However I could not understand few things in it because I have zero knowledge about VM parameters. Never heard about them and read about them.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:@Mathur: I tried my my attempt has failed. I gave my proxy details and proxy port. But I cant find an option to get the proxy password.
Can you please suggest me? Thank you in advance.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:@Mathur: I tried with these settings
-Dhttp.proxyUser=akash.malwa.proxy
-Dhttp.proxyPassword=logmein667#
-Dhttp.proxyHost=192.168.6.241
-Dhttp.proxyPost=8080
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Palak Mathur wrote:
??? What is the error that you are getting?
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:
Palak Mathur wrote:
??? What is the error that you are getting?
Please refer the above edited post. Before I recognized and edited the post you replied.Thanks for the quick reply.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:Even when I try to open a connection to a machine on my network it is throwing FileNotFoundException.
The url I gave is
http://192.168.53.32:8080/test/sample.html
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Palak Mathur wrote:Are you able to ping the local machine? Also check with admin, if it is allowing you to access those web urls through the proxy.
Love all, trust a few, do wrong to none.
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:Thank god!!! The problem is with
System.getProperties().put("http.proxyPort", "80");
The port has to be set to 8080. Now its working. However I am not getting the entire web page. And I am not sure this is the right approach. Because I am hard coding the properties using System.getProperties().put(String,String)
Whereas I have only class files. The developers who supplied the code to me have proxy disabled, so they don't need to use the code.
I want to know is there any way to add these to the VM parameter list?
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Love all, trust a few, do wrong to none.
Love all, trust a few, do wrong to none.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:You are using a read line but a print string. That means that no line-terminator characters are being output. Use println() instead.
In addition to the loss of fidelity, end-of-line typically triggers a buffer flush, without which you could fail to push out all of the input. Although an explicit flush after end-of-file wouldn't hurt.
Love all, trust a few, do wrong to none.
Tim Holloway wrote:You are using a read line but a print string. That means that no line-terminator characters are being output. Use println() instead.
In addition to the loss of fidelity, end-of-line typically triggers a buffer flush, without which you could fail to push out all of the input. Although an explicit flush after end-of-file wouldn't hurt.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Love all, trust a few, do wrong to none.
chaitanya karthikk wrote:Ok. Do you mean I should not use println() inside a loop while trying to read form a stream?
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Tim Holloway wrote:
chaitanya karthikk wrote:Ok. Do you mean I should not use println() inside a loop while trying to read form a stream?
No, I mean the problem is that you didn't use a println(). You used print().
For a truly faithful (and higher-performance) copy, you would actually want to use a bulk copy, pre-allocating a fixed-sized buffer and filling it up as much as possible on each read/write iteration instead of line-by-line. But in the case of an HTTP output stream, it isn't essential to do that.
Palak Mathur | What is JavaRanch? | List of All FAQs |
My LinkedIn Profile
Tim Holloway wrote:
chaitanya karthikk wrote:Ok. Do you mean I should not use println() inside a loop while trying to read form a stream?
No, I mean the problem is that you didn't use a println(). You used print().
For a truly faithful (and higher-performance) copy, you would actually want to use a bulk copy, pre-allocating a fixed-sized buffer and filling it up as much as possible on each read/write iteration instead of line-by-line. But in the case of an HTTP output stream, it isn't essential to do that.
Love all, trust a few, do wrong to none.
Don't get me started about those stupid light bulbs. |