tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Dane <...@hotu.com>
Subject Re: Problem with getRequestDispatcher
Date Tue, 30 May 2000 21:13:27 GMT
>>>>> "Mike" == Mike Karl <mike@gcisoftware.com> writes:

    Mike> I am trying to forward the request from a Servlet to a JSP
    Mike> using getRequestDispatcher.  Tomcat is giving me an error
    Mike> when I try to do this:

    Mike> ServletContext sc = getServletContext(); RequestDispatcher
    Mike> rd = sc.getRequestDispatcher("../CustReg.jsp");
    Mike> rd.forward(req, res);

    Mike> I get: java.lang.NullPointerException at

the getRequestDispatcher method in ServletContext requires an absolute 
path: one starting with a '/'.  the javadocs are pretty clear about
this, as I recall.

there is also a getRequestDispatcher in ServletRequest which can take
a relative path.

-- 

joe

Mime
View raw message