Anwar Hussain

Ranch Hand
+ Follow
since Jul 24, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anwar Hussain

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.



So when a thread is in the middle of execution of the synchronized block with 'this' as argument , can another thread call a synchronzed method of that same object???
15 years ago

Patricia Samuel wrote:See it here



Its confusing me
15 years ago
Hi,

Can some body explain the difference between synchronized method and synchrozed block.

Thanks
15 years ago
Hi,

If we synchronize a method and if one thread enters that synchronized method the other threads can't enter the same or other synchronized methods of that class.
Then what about the block of synchronized code.What happens if one thread is executing that block of code.Can the other threads enter the other methods???Please help me come out of this confusion.

Rob Prime wrote:Which exceptions you can and cannot throw from a method is a beginner's topic. Moving.



Hi ,

This is relatec to overriding. so it should not be moved.
15 years ago
I have the method signature which looks like below



I want to override this method .Please, let me know the restrictions on the throws list(Exception list) of the overidden method.I want to know the possible combination of throws exceptions of the overiding method.
15 years ago

Bear Bibeault wrote:Some containers have pre-compilers. Without knowing anything more about your setup, can't say.




Iam using Tomcat server. Do you have any idea with this server for precompilation.
15 years ago

Hi,

How can I avoid the compilation time of the jsp's. i.e translation time taken to translate from jsp to servlet .

i.e i dont want my jsp to be translated when the request comes for that page.

Can't I make it that all my jsp's get translated at the time of deployment.

15 years ago

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






Popup window is the best solution where in you can generate the report in popup.You can display the wait message in the popup itself.

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)




hi,
you mean to say it is the priority value for creation of that servlet object???
15 years ago
Hi,

Please explain the significance of the value we will give for the tag <load-on-startup> in web.xml file.

Ex :

In the above tag what the value 5 indicates ???
What if I give 3 instead of 5.
15 years ago
Which version of weblogic application server is suitable for Windows vista operating system and how can I download it for free.
15 years ago
Hi ,

I have got two difference

Vector is a legacy class
where as ArrayList is not a legacy class.

Vector is synchronized but ArrayList is not.

Any more differences please let me know.
15 years ago

Mukesh Ranjan wrote:Go to below link
http://mk.ranjan.googlepages.com/javainterviewqa




Thanks dude. For interview QA's.lot more helpful.
15 years ago