bug candidate

Hi JigSaw fellows,
it seems there is a candidate for a new bug in JigSaw.

Wenn a servlet tries to forward to a jsp-page,
the presence of a pathInfo in the servlet's url
will make the forward fail:


if request.pathInfo() != null
	then getContext().getRequestDispatcher("url.jsp").forward(request,
response) fails
if pathInfo == null then the same forward workx.

I've tried with three differnt implementations of the servlet-2.1 api, all
with the same result: I tried Jigsaw's, gnuJSP's and SUNs.

I wrote yo a small servlet with a jsp page to demonstrate it - that servlet
accepts input from either the querystring or the pathInfo and then forwards
to a jsp-page that displays the data and presents some links back to the
servlet:

public void service(HttpServletRequest request, HttpServletResponse
response)
    throws ServletException, IOException {

  try {
    String message = request.getPathInfo();
    if (message==null) message = request.getParameter("msg");		// forward
just works, wehn THIS happens
    if (message!=null) message = message.toLowerCase();
    tell(message);
    if (message!=null) request.setAttribute("message", new String(message));
    getServletContext()
      .getRequestDispatcher(jspName)
      .forward(request, response);
  }
  catch (Exception e) {	e.printStackTrace(System.out); }

----------------------------------------------------------------------------
----

JigSaw: release 2.1.2
gnuJSP: 1.0.1Pre1 - 21 Apr 2000
JDK: java version "1.2.2" / Classic VM (build JDK-1.2.2-001, native threads,
symcjit)
Servlet-API: V2.1 - SUN's, Jigsaw's and gnuJSP's.
OS: WinNT4/SP6

----------------------------------------------------------------------------
----

thatz it!
I hope, you can verify this behaivour on your environments.

Thankx again for working on Jigsaw
and all the best from Vienna, Austria.

Werner

Received on Friday, 15 September 2000 05:52:37 UTC