aspose file tools
The moose likes Servlets and the fly likes why am i getting null pointer exception? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "why am i getting null pointer exception?" Watch "why am i getting null pointer exception?" New topic
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
    
  52

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why am i getting null pointer exception?
 
Similar Threads
Tomcat Error
a simple quiz on parseType(String)
NumberFormatException
NumberFormatException
JNLP I am getting the File Not found exception