prasanth chiru

Greenhorn
+ Follow
since Mar 14, 2004
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 prasanth chiru

Hi lokesh,
I have downloaded the code of oreilly and used it in my -program for downloading. The code is like this.
MultipartResponse multi = new MultipartResponse(res);
multi.startResponse("text/plain");
out.println("On your mark");
multi.endResponse();
try { Thread.sleep(1000); } catch (InterruptedException e) { }
multi.startResponse("text/plain");
out.println("Get set");
multi.endResponse();
multi.finish();
I am getting the dialog box asking for the options "want to open in the current locatio" or " save the content to disk". If I select a particular option, the class file of this progarm is getting downloaded. If I want to download a figure or some text, where should I mention it. Can you pleasea give me some program for that.
Thank You.
19 years ago
Hi lokesh,
Thankyou very much for the immediate reply. I am just opening the site you have given. If I have any doubts further regarding this, I will contact you.
Thanks once again.
Manjunath
19 years ago
Hi,
I am developing a web site in which we have a button "Download" in a document, which downloads that document and stores on the clients machine. If anybody has done this earlier or anybody has idea about this please help me.
Thanks
19 years ago
Hi,
I am developing a web site in which we have a button "Download" in a document, which downloads that document and stores on the clients machine. If anybody has done this earlier or anybody has idea about this please help me.
Thanks
19 years ago
Hi,
I am developing a web site in which we have button "print" in a document to print the content of that document. Can any help me how to do it in java. If you have the code please give me.
Thanks much.
19 years ago
Hi,
I am developing a web site in which we have button "print" in a document to print the content of that document. Can any help me how to do it in java. If you have the code please give me.
Thanks much.
19 years ago
Hi jply,
I don't think the logic given by you is correct. I inserted these lines in the code after u.start()(ie, line 1 marked in program).
if(!t.isAlive())
System.out.println("Alive");
That means if thread t is alive, it should not print "Alive" and
has to print "in run" second time (u.run(), as you said). Is it correct. But it is not happening. It is not printing "Alive" and also it is not printing "in run" second time.
Pl. correct if I am wrong.
Hi all,
The program is printing some times only in run and sometimes in run in run(twice).
Prasanth
Hi rahul,
Tahnkyou much for the good summary. I learned some new points. Keep giving us some more summaries.
Prasanth.
Hi rahul,
Thankyou very much for the clear explaination.
Hi rahul,
Thankyou much for neat explaination.
Hi,
I have coded the following example to check for interrupt().
Can you please explain the output, why it is coming like that.

class Thread1 extends Thread
{
public void run()
{
try{
System.out.println("Inside run:1");
sleep(10000);
System.out.println("Inside run:2");
}
catch(InterruptedException e)
{
System.out.println("Inside interrupted exception");
}
System.out.println("after catch");
}
}
class Thread4 extends Thread
{
public void run()
{
System.out.println("Inside thread4 run");

}
}
class Thread2
{
public static void main(String args[])
{
Thread1 x = new Thread1();
x.start();
Thread4 y = new Thread4();
x.interrupt();
y.start();
System.out.println("Inside main method");

}
}
If I place the x.interrupt() statement after y.start(), what will happen. please explain me. I am confused.
Thanks.
Hi rahul,
I am new to threads. I have gone through all yours questions for begiinners, they are very good and very informative for beginners. Why can't you give some good example on synchronization so that we can be clear about synchronization. I am having lot of doubts in that.
Please do it asap.
Thanks.
Hi,
In my object I am having many synchronized methods. If a thread is calling one synchronized method, can any other thread call some other synchronized method of the same object at the same time.
If anybody knows about it, please help me.
Can anybody tell me what are the questions on Socket, MediaTracker and append, that are frequently asked in the exam. I heard from many people regarding this. I will be grateful if somebody helps me in this.
Regards,
Prasanth.