Siddhesh Deodhar

Ranch Hand
+ Follow
since Mar 05, 2009
I am cute handsome guy.I am famous among my circle for innovative things that come out of my mind.
Goa India
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
8
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Siddhesh Deodhar

I have JSON schema as follows



Which is saved as ExampleResponse.jss . Using 'jsonschema2pojo' maven plugin, i generated POJO class from this schema.
Using this class I am trying to create a JSON response and the expected output response should be { "example":{ "age":68 } }
Since the Generated POJO is class Example{ ..... } output Response i am getting is { "Example":{ "age":68 } }

How I can achieve desired response in which i have lower case 'example' word.
4 years ago
Hi Paul, Koen

I am now able to get the string in desired base64 encoded format. Yes, my mistake was that I was passing string value of MD5 output rather then byte array itself.
Thanks a lot.
7 years ago
Hello everyone,

My client wants to convert a string into MD5 and then get it base64 encoded. At his side, using some methods in C library, he did encoding as follows

plain text is siddhesh
md5: 9ca574b17a244ba0d8036e1387af1f2b
base64: nKV0sXokS6DYA24Th68fKw== (len=24)

Using Java Base64 class, I am not able to get value of "9ca574b17a244ba0d8036e1387af1f2b" as "nKV0sXokS6DYA24Th68fKw==".
I am getting larger value like "OWNhNTc0YjE3YTI0NGJhMGQ4MDM2ZTEzODdhZjFmMmI=" and same is the value when I do encoding using any online converter.

Any inputs on how to user Base64 class or some other technique with Java to get the Value as above in length of 24
7 years ago
Thanks for entertainment :-). I fixed it.
7 years ago
Hi all

I have regular expression to find out valid url inside a text. its like follows
http://|https://|ftp://|ftps://|news:|www.)[^\"\'\\(\\)\\[\\{\\}\\<[:space:]]*

This works fine for all valid URL's. i.e. if URL in text is say" http://10.44.5.7:8080/abc/xyz[ooo" then valid url will be
"http://10.44.5.7:8080/abc/xyz"

Now I have requirement where IPv6 addressed URL of format "http://[address]:port" I need to handle.
I change the regular expression as follows

http://|https://|ftp://|ftps://|news:|www.)[\\[]*[^\"\'\\(\\)\\[\\{\\}\\<[:space:]]*

i.e. added "[\\[]*" between valid characters and invalid characters.

Is there any better fix then this ?
7 years ago
Resolved while parsing the mail. Added logic to extract data in different fashion.
7 years ago
Hi all

I have my mail reading application in jsp which display's an email message. I am trying to display a mail which is having images embedded in it.
However i am not able to see images contained inside mail. I can see images when i open the mail in thunderbird.

When i opened mail message in notepad i saw that content-id value of images referenced was not present withing angular braces.

example

<img src="cid:Logo.gif"..>

corresponding content was like follows

Content-Disposition: inline; filename=Logo.gif
Content-ID: Logo.gif

R0lGODlhswA1APcAAOsKHCY0bug........
So here , if i replace line "Content-ID: Logo.gif" with "Content-ID: <Logo.gif>", I am able to view images.
As per RFC (http://www.ietf.org/rfc/rfc2392.txt), i found that content-id is enclosed in angle brackets (<>) but on wikipedia, I found that this is not mandatory.
Anyone knows what's the correct format of content id ?

Within my code while reading the message, if i go to change value header "Content-id" to "<logo.gif" using setHeader method, I get IllegalWriteException.
I guess its because i cant modify incoming mail . Please correct me if I am wrong.
7 years ago
yes. 'S' means System.
7 years ago
For my campus placements, Interviewer asked me one funny(deadly) question.
He said, "write a program whose output is the program itself".

I thought on it for while, Interviewer was smiling saying take your own time kid and started smoking.

After stretching my head i shouted, "Sir, within my code I will read the same code file and display"
"Amazing kid"..you are right, please write it and show me.
With victorious face, i wrote code in front of him in C considering standard's, indentation and other conventions.

Interviewer was very happy and started behaving like he is my uncle. . Asked me few questions about my family and some other technical stuff.
I got selected without any hassle.

He gave me few sample answers which my friends told him. Following are some which i rememebred
- We need to read RAM
- We need to print code as it is in "print" statements.

Well, This might be a joke, but the question he asked me can stand deadly when you are under pressure.
OOPS

Some people are like Interfaces.

They just declare things.

Some people are like abstract classes.

They do some work and rest is for others.

Some people are like classes.

They do most of the work and some of these

remains as slaves for entire life.

Some are like beans.

They take information and give to others.

Some are like beans without setter methods.

They only give info but never listen to anyone.

Some are like XML files.

Their entire life goes in configuring things.

OOPS, what kind of people I am staying with ?

Cant imagine myself if I was Commerce, Arts or other non Computer Science graduate

- Author : Siddhesh Deodhar (learnt from past experience in I.T. field)
7 years ago
Hello every one. Hope this is right place to ask this question.

I am trying to open my Tomcat's home page with IPv6 url (http://[::1]:8080/) in safari browser 5.1 on windows XP.
It doesn't opens it. Blank page is showed.In error console I see error:400 Bad request.
400 error comes because Tomcat is unable to process the url as it is not in proper format that tomcat understands.

But url (http://[::1]:8080/ )opens successfully in Firefox, Chrome and IE on my same machine.

My Safari passes few tests mentioned here (http://support.apple.com/kb/TS3802)

I have posted the topic on safari forums and have sent mail to safari team. No reply yet.

Any one knows what changes needs to be done at Safari side?
7 years ago
When I fire the url http://[0000:0000:0000:0000:0000:0000:0AF4:C035]:8080
which is ipv6 conversion of my ipv4 address URL http://10.244.192.53:8080/ I get following error

Unable to connect
Firefox can't establish a connection to the server at [0000:0000:0000:0000:0000:0000:0af4:c035]:8080.

Tomcat is running on my desktop Windows 7 system. I have enabled IPv6 on my windows 7 OS. I learn that I
dont need to do any changes to my tomcat 6 to support IPv6.

Any idea why I am unable to access the page?

8 years ago
Yes, "netstat -ln"returns following



Well, it looks like proxy issue to me, when I say no proxy, I am able to open home page of my tomcat running on my local machine using
link http://[::1]:8080/

But when i try to open the same url using ip address like follows
http://[0000:0000:0000:0000:0000:0000:0AF4:C035]:8080

it says page not found.
8 years ago
Hi all

I want to migrate my application from ipv4 to ipv6.
I am using Tomcat 5.5.7 running on my GNU linux with kernel version 2.6.18-164.el5.
While searching on the net I found that if your OS supports IPV6 (which is yes in my case) I don't need to do any
changes and tomcat 5.5 and later supports IPv6

I tried to opening home page of Tomcat in IPV6 format. Like follows

http://<ip>:8080/ - Opens Tomcat home page
Below 2 gives no network access message
http://::ffff:<ip>:8080 - Does not opens
http://[0000:0000:0000:0000:0000:0000:0AF4:0070]:8080 - Does not opens

I tried to ping that machine with IPv6 format address. I got reply back
V:\>ping ::ffff:<ip>
Pinging <ip> with 32 bytes of data:
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63
Reply from <ip>: bytes=32 time<1ms TTL=63

So this means my local machine(Windows 7) supports IPv6.

I tried installing Tomcat 6 on my windows machine and and tried opening link in IPV6 format
http://[::1]:8080 but it does not works.

Am I missing on anything else ?
I am searching on Net regarding this. If any one has and good link or document to share , please let me know.
8 years ago