Madhavan Santhanam

Greenhorn
+ Follow
since Sep 24, 2007
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 Madhavan Santhanam

Hi,
I have a drop down box in my jsp. When the user selects an item from that drop down box, I have called a script method(in the onchange attribute of <html:select>.From that scripting method I have called an Action which is used a display a pdf. PDF is getting opened properly for me. But it gets opened in the same browser. For opening in different browser, I need to go to Acrobat reader->Edit->Preference->Select internet and undo the check box"Display PDF in browser". So is there any way that my pdf gets opened in different browser?

Thank you!!

To moderator:
I have asked this in Servlet section, I got the reply that the problem is not with servlet. So I am posting it here. Please consider this post.

Thank you!!
Hi,
The problem is, My pdf document is getting opened in the same browser where my application is present. So after viewing the PDF i cant go back to the application.I have to once again open a new browser. To avoid this problem, I went to the Acrobat,Edit->Preference, Internet tab-> and unchecked the option "Display pdf in browser".It works. But i don't wanna do like this. I want my PDF to get opened in a separate window. But i don't know how to do it. Can any1 help me?. Thanks a lot!!!



response.setContentType("application/pdf");
response.setHeader("Content-Disposition","inline;filename"\""+doc.getName()+".pdf"+"\"");
ByteArrayInputStream pdfStream = new ByteArrayInputStream(contentArray);
.......
.......
.......
Thanks for the post.I ll make sure that I wont use the word "urgent" in the future...
14 years ago
Hi,
The problem is, My pdf document is getting opened in the same browser where my application is present. So after viewing the PDF i cant go back to the application.I have to once again open a new browser. To avoid this problem, I went to the Acrobat,Edit->Preference, Internet tab-> and unchecked the option "Display pdf in browser".It works. But i don't wanna do like this. I want my PDF to get opened in a separate window. But i don't know how to do it. Can any1 help me?. Its urgent..Thanks a lot!!!



response.setContentType("application/pdf");
response.setHeader("Content-Disposition","inline;filename"\""+doc.getName()+".pdf"+"\"");
ByteArrayInputStream pdfStream = new ByteArrayInputStream(contentArray);
.......
.......
.......
[ January 11, 2008: Message edited by: Bear Bibeault ]
14 years ago
I cleared my SCJP1.4 today with 90%.
I would like to thank each and every member of this forum.
You guys are great and Please continue with this great service of helping others.

Thank you!!

Madhavan S
14 years ago
Here, Instead of using A and B, try to use Object and String
void m(Object a){ System.out.println("Obj");}
void m(String a){ System.out.println("String");}

Tha ans will be String. Because String is the child class of Obj. String will be more specific for null.

The same applies to your program too..

Thank you!

The above code will give Unreachable code error on the println statement
Why not the below code

show() will throw the Exception in all case. so the println() wont be reachable.But why the compiler didnt give the error.

Thank you!!
According to me the following things happened

1. static block gets executed when the class gets loaded, so here k will be 2 when the class
gets loaded.

2. Instance block will get executed when an instance for tht class gets created. i,e in this example, Practice t1 = new Practice(); statement will cause the instance block {k=k*2}to gets executed(constructor will get called only after this), Since k is a static varable, it ll be common for all the obljects of Practice. Now, k will be k*2=>2*2=>4

3. Similarly when Practice t2 = new Practice(); gets executed, k will become 8.

4. And t1.k,t2.k ,k refers to the same static variable k, so it prints 8,8,8

Thank you!!
Hi,
Can any1 please tell me that do we have to study about the methods in collection classes for 1.4 exam?Because, in my K&B book they just described about each collection class and interfaces but not about the methods present in them.
I found some mock papers asking question related to methods in collection classes,interfaces and Iterators thats y i am asking?.Thank you!!


What will be the output of running class Test?
Select 1 correct option
(1) false false true false true
(2) false true true false true
(3) true true true true true
(4) true true true false true
(5) None of the above
Answer :4
Whats the major difference between line 3 and 4
Similar is the case for Integer i =25 I guess.
Thanks for all your replies
oh,I m no sure abt the version I use, so for scjp1.4, what ll the answer?.WIll it be compile time error or not?
Thanks!!
Thanks for the replies.
FYI, option f gave me a compile time error..