Anil Karamchandan

Ranch Hand
+ Follow
since Sep 12, 2009
Merit badge: grant badges
For More
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anil Karamchandan

Hi Rob,

thanks for the reply, by authsope you meant, get the "realm" String using the authScope class ? I did saw that earlier but was not able to get more info about that ? can you please elaborate ?

thanks !
13 years ago
Ok, I was able to add authentication and encoding to the code, as of now the code looks something like this.



Using this I get the return value for rCode as "406". Why am I receiving a response which is "Not Acceptable" Anything which would help me debug better and fix this.
13 years ago
Hi,

Looking at all the cases/possibilities, i have opted to do this using httpclient or urlconnection class. I have not written the complete code but have just manage to write which would get us started atleast..

If I had used curl - I would have to write the following.



this would have returned me an output in XML

with httpclient i think this could be done with something like this...


With this, I have only taken care of the parameters, how to I pass the username and password with this ? any help ?
Also by default, with CURL the username and password is encoded with base64 internally, that would mean now I have to take care of 2 things

1. Encode the Username and password with base64 format
2. Accommodate the username and password in httpclient call.


13 years ago
thanks but how about doing it with curl ?
13 years ago
I asked the same question to my boss and the answer was yes. Just for curiosity what other ways are you referring to ,I know httpConnection class can be used.
13 years ago
Hi,

I am not sure if this is the correct place to post this, please feel free if the moderators can find a better place for this post. I have a general question regarding using curl (http://curl.haxx.se/) with Java. I have a web-application running in tomcat, based on certain actions in my web-applications I need to write a java code which would trigger curl. Curl would then query a third-party application and return an XML/JSON.

this has to be read by me and return appropriate response to the user.

Can this be done ? I see that curl has a binary distribution for Linux, once I download it (http://curl.haxx.se/download.html) how do I call this from my java web-app.

thanks !
13 years ago
Hi all,

I would like my java program to scan a document, is there a free api which I could make use of to scan a document ?

thanks !
13 years ago
I am trying to send a web request via http, below is my code and the error, I am not sure why there is an error on the outputstreamwriter. it seems i am doign the correct thing.

Can any one please help



13 years ago
JSP
yes, I am trying to map the pojos to the database entities, like ORM, do we have any app that does that .?
HI all,

i have an xsd schema, I was able to create pojos from the given xsd schema, since the xsd was quite big, there are quite a few pojos involved, now my next step is to create a database to store these pojos. I would like to know is there a way by which tables in mysql could be created based on the pojos or xsd schema ?

If yes could you please let me know how ?
HI Eric,

well there is always a requirement, actually I am generating a pdf doc and I am displaying the pdf in the pop up (new window). the code below and the code which I have (same code basically) works only in Firefox and chrome but not in IE. In IE it still displays the location (address bar).

when you have a requirement, you need to fulfill it, its not worth asking for a workaround.. if the client is happy you are happy :P

anil
the solution given by Stan James was helpful however this works only in firefox, not in IE, in IE I still get the address bar on the top

any hints how do we do it in IE.
got the answer, actually in pdf ( ) - is one field while the remaining number is the other field, thus there are 2 fields to complete one phone number - same goes with fax.
can anyone throw some light on it please, below is the code and the explanation.



In the try block, I am trying to set the values for the pdf form i.e

, now say in the html I have a phone field which has a value (1234567890) in the pdf for the same phone field I will have ( ) 12345678 .

Can any one help me with this.
Hi all,

I am a newbie to using Itext API, so far it has been a nice experience, however I am currently being faced with a problem and would appreciate if anyone could help in to find the answers.

I am trying to write to an existing pdf (filling an existing pdf with data), the code works just fine, however I am unable to write to fields like "Phone" and "Fax" correctly. The fields like "phone" and "Fax" have something like this [( ) ] (exclude the [ ]) when i try to write into these fields the text which is displayed is something like this [( ) 2222232]. Can any one let me know how to fix this ?

Would appreciate your help.

Regards