Thanks, I tried the 

-----Original Message-----
From: Johansen, Roar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 11:14 PM
To: JRun-Talk
Subject: SV: getServletContext exception

Thanks, I tried but, it does not seem to have helped. I am getting the same
exception. I will try this with SevletRunner and see if I will get the same
exception.

Thanks,
Ravi

>Hi All,
>
>I am trying to get the ServletContext in the my Servlet and I am getting
the
>following exception. 

Hi,
try
        String url = "/jsp/TestProj/Test.jsp";
        ServletConfig sc = this.getServletConfig();
        ServletContext sContext = sc.getServletContext();
        RequestDispatcher rd = sContext.getRequestDispatcher(url);
        rd.forward(request, response);

Roar :)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to