| Author |
Synchronization issue in Jsp
|
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 214
|
|
Hi all,
I have a jsp pagewhere I have used an useBean for instantiation of a bean in session scope.
Now the problem is that sometimes this page is giving NullPointerException when multiple user or may be first time hitting this page.
In compiled java file of this jsp there is a synchronized block(synchronized(session)) where the instantiation is occuring.
So I am confused what is happening as because the requests will wait untill instantiation ,so no question of "Null".Please help.
|
Thanks in Advance,
Kousik
|
 |
Sony Agrawal
Ranch Hand
Joined: Oct 04, 2009
Posts: 143
|
|
You have created the obj1 using bean and set that in session.
How do the scriplet know "what is obj1"
Is it sometimes or always ??
|
 |
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 214
|
|
ya. It is added as an attribute in session scope.That part is ok.
An coming to your next question it happens sometimes.
Even after 1/2 tries it runs smoother when it gives error.
|
 |
 |
|
|
subject: Synchronization issue in Jsp
|
|
|