| Author |
why am i getting null pointer exception?
|
Saravanan. Shanmugam
Greenhorn
Joined: Jul 27, 2010
Posts: 2
|
|
|
I created a new servlet. when i tried to get ServletConfig using this.getServletConfig() or getServletConfig() i'm getting nullpointer exception.. Any idea on why am i getting this?
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Welcome to JavaRanch
do you override init(config) ? <edit>and trying to access getInitParameter ?</edit> if yes, call super.init(config) as a first statement . else override init which dont have argument.
by the way : Carefully Choose One Forum
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8142
|
|
Moved from MD forum.
|
[My Blog] [JavaRanch Journal]
|
 |
Hebert Coelho
Ranch Hand
Joined: Jul 14, 2010
Posts: 754
|
|
|
Could you post your code?
|
[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
|
 |
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
|
Without your code its impossible to tell what's going wrong and where.
|
 |
 |
|
|
subject: why am i getting null pointer exception?
|
|
|