The cause of this (at least 99.9% of the time) is in your init(ServletConfig
config) method.  Did you remember to call super.init(config)?

Craig McClanahan


Marco M wrote:

> hi all,
>         i am using the model 2 architecture, and from the ACtion class i
> call
> servlet.getServletContext().getRequestDispatcher(url);
>
> however, i always got the exeption
>
> java.lang.NullPointerException
>    at javax.servlet.GenericServlet.getServletContext
>
> i am using as a servlet/controller  a class called ActionServlet, that
> extends Servlet
> and i am using tomcat 3.1
>
> anyone can help me??
> thanx in advance and regards
>         marco
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to