GeekInterview.com
Answered Questions

Illegal state of exception

Asked By: dsureshkumar28 | Asked On: Apr 3rd, 2008

When does thread throws illegal state of exception?Explain with two scenarios?

Answered by: mkgraumt on: Sep 27th, 2008

Any attempt to change the status after the thread has been started, throws an IllegalThreadstateException.Scenerio 1If a thread has already started and you try to call method setDaemon(boolean) on thr...

Answered by: charankk on: Apr 29th, 2008

Hi,There are one scenario where we can use it as shown below.Two threads within the JVM both gain access to the same  object. One thread invalidates the object and then the other thread attempts ...

Can we use main method inside JSP? Why?

Asked By: ganeshvertech | Asked On: Jun 22nd, 2007

Answered by: ashish on: Aug 5th, 2011

Can someone tell me...how a servlet container execute init(),service() and destroy() method in a sequential manner ?
is it true that a servlet container itself contains a main() method which call these methods ?

thanks in advance...

Answered by: mullangi13 on: Jul 29th, 2008

We can use main method in Jsp/servlet, but there is no use. This main() method will not execute throughout the life cycle. Then why should we need to use.Generally these JSP/Servlets are server side t...

When JSP is compiled into servlet, where the servlet is actually stored(storage location)?

Asked By: sadashivarao | Asked On: Jun 19th, 2006

Answered by: charankk on: Apr 30th, 2008

when the request from browser is coming for first time to access the jsp page.
Container check whether jsp is already translated to servlet or not.
If not ,it will translate the jsp to server and the as usual  service method will be called to include the contents dynamically.

regards
Pavan kolla

Answered by: Santosh M on: Jul 3rd, 2006

In Tomcat, it is stored under work directory of tomcat

For example, if your tomcat is in c: drive then it is stored in following location

C:jakarta-tomcat-5.0.28work

A] is the response.Sendredirect ends the existing session?B] if I logged in to a site ( say a.Com) & then in same browser window I type the url for another site (say b.Com), then does my session gets ended...

Asked By: pisalya | Asked On: Mar 18th, 2006

Answered by: ajkush on: Jan 18th, 2011

no. both session retained.

Answered by: charankk on: Apr 30th, 2008

Hi Prasanth, The case is differnt here.Assume you have opened gmail.com and logged in... session will be created.Then you have tried to replace the url as yahoo.com, here the browser will identify the...

Which of the following allows phantom read in JDBC, connection class?

Asked By: Interview Candidate | Asked On: Dec 10th, 2005

A) transaction_read_uncommittedb) transaction_read_ committedc) transaction_serializabled) transaction_repeatable_read.Explanation: a phantom read is where one transaction reads all rows that satisfy a where condition, a second transaction inserts a row that satisfies that where condition, and the first...

Answered by: pradeepkmr18 on: Jul 3rd, 2008

These will allow phanthom read
Read_uncommited
Read_commited
Repeatable_read

Answered by: charankk on: May 2nd, 2008

Guys ...do not give any wrong answers,If you know very well then answer.

Here to avoid the phatom read ,we will go for TRANSATION_SERIALIZABLE ,Which blocks the records in row level .But this affects performance drastically .
Hence the answer is  "C "

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: