Help coderanch get a
new server
by contributing to the fundraiser

Markandey Sahu

Greenhorn
+ Follow
since Jun 29, 2006
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Markandey Sahu

I want to know why life cycle method required in servlet or in jsp. What is need of life cycle method why servlet container is designed to execute life cycle method int, service and destroy.
13 years ago
hi all,
I can access the private variable. how?? i am showing now
write these two class and compile and run
1st class file name:MyClass.java

2nd class file name: Test.java

compile and run you will get out put:
hello world

now magic is here make following changes in MyClass.java

(means now your MyClass.java become following)

now be careful compile only MyClass.java file not the Test.java file
after compilation run Test class using command (java Test)

now you will get output:
my private variable
MyClass private method

Note: Please run the following application in your console
don't use any editor .. eclipse or other else

if you get reason for this behavior pls answer me
thanks in advance
17 years ago
hi all,
I can access the private variable. how?? i am showing now
write these two class and compile and run
1st class file name:MyClass.java

2nd class file name: Test.java

now be careful compile only MyClass.java file not the Test.java file
after compilation run Test class using command (java Test)

now you will get output:
my private variable
MyClass private method

Note: Please run the following application in your console
don't use any editor .. eclipse or other else

if you get reason for this behavior pls answer me
thanks in advance
Hi all,
i have one question : i want to know who call the doGet method or doPost method container or service method.

answer is
[code]
Answer


C)

This code is valid and will handle all three types of HTTP requests including GET, POST, and PUT.

D)

The next method invoked is destroy.

[/code}
i don't have problem with second answer [d] but i have problem with choice [c] please clear it.
thanks in advance
Hi all
i have one problem pls reply me with reason.
thanks in advance


It gives
java.lang.IllegalStateException: getOutputStream() has already been called for this response
My question is when it's already been called?
And one another question Can we print String in this object

or this object is only for binary output. pls give me reason for both the case
1.servlet class
2.jsp page
Can any one tell me difference between <%include file=""%> and <jsp:include file=""> and which one is faster?
write return null; instead of mapping.findForward();
17 years ago
how can i check my certification details? I have clear the scjp & i want to check my status in web site?
Can any one give me code for connecting mysql database?
Wich driver we can use for connecting database.
pls give me complete code..
Class.forName("???");
Connection con =DriverManage.getConnection("???","??","??");
what i have to write in place of ???
Can any one give me code for connecting mysql database?
Wich driver we can use for connecting database.
pls give me complete code..
Class.forName("???");
Connection con =DriverManage.getConnection("???","??","??");
what i have to write in place of ???
Hi Asha,
I m also preparing for scjp5.0.Can u send me the link of "nthuware alpha SCJP 5 mock exam" . So i can download exam simulator. pls help me..
Regard..
Markandey