jsp bean losing pageContext or ServletCentext randomly and giving NullPointerException
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kevin_rowe
Posted On:   Thursday, January 23, 2003 01:34 AM

an ancestor bean defines an initialise() function which sets a
protected variable pageContext.
This is used in my bean function to do the debugging code

Servletcontext s = pageContext.getServletContext();



This will randomly fail with a NullPointerException.



Any ideas?

Re: jsp bean losing pageContext or ServletCentext randomly and giving NullPointerException

Posted By:   kevin_rowe  
Posted On:   Monday, January 27, 2003 02:37 AM

the bean was wrongly being shared between two pages.

the problem was resolved by creating a separate bean and communicating between them by session.get/setAttribute.



K.R.
About | Sitemap | Contact