When does thread throws illegal state of exception?Explain with two scenarios?
Can we use main method inside JSP? Why?
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...
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)?
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
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
no. both session retained.
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?
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...
These will allow phanthom read
Read_uncommited
Read_commited
Repeatable_read
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 "
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...
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 ...