Patricia Samuel wrote:with a synchronized block you can choose what to synchronize on. With a synchronized method, an instance method always synchronizes on the instance, a static method always synchronizes on the class.
synchronized(this) can have any object you want to synchronize where as when a method is synchronized it will work with instance for which it is called.
Rob Prime wrote:Which exceptions you can and cannot throw from a method is a beginner's topic. Moving.
Bear Bibeault wrote:Some containers have pre-compilers. Without knowing anything more about your setup, can't say.
manisha gupta wrote:There are many ways to display the message “please wait while ….” when the page is loading.
But in our application,
We have to display the same message when the report file (xls,pdf etc) is opening.
For this, we have one jsp file say ‘abc.jsp’ and this jsp calls a servlet say ‘file.class’.
File.class takes some parameters like report_id and report_location (location at server) passed by abc.jsp.
If we apply the window.onload = <some function() > to display the “please wait…” message, it does not work.
And if we remove the concept of servlet and simply replace the window using location.href and assign the location like-
Location.href = “http://abc.com//xyz/infy/mnc.xls” then problem comes as – when abc.jsp is opening that time the “wait…” message comes for short time but as soon as the url is replaced with “http://abc.com//xyz/infy/mnc.xls” , the “wait…” message disappears. I know this is happening because of new page on the same window. So can we have message while the link takes time to get open. Because this is our actual requirement. And we want to show the message to users when any huge size file is opening.
Any suggestion??
Thanks,
Manisha
Sebastian Janisch wrote:It means that if you have another servlet with a value for <load-on-startup> that is less than this one, it will get loaded before this servlet.
A positive value means that it WILL get loaded upon server startup (I think 0 too, not 100% sure though)
Mukesh Ranjan wrote:Go to below link
http://mk.ranjan.googlepages.com/javainterviewqa