Discussions

Web tier: servlets, JSP, Web frameworks: Problem with servlet forwarding with IPlanet/weblogic

  1. Hi,
    We have a IPlanet webserver in front of a Weblogic 5.1. Request which contains ".jsp" are served by Weblogic (we use wl-proxy to pass the request to Weblogic).
    We are not able to forward from a servlet declared IPlanet to a servlet declared in Weblogic (under the name "signatureok.jsp").

    We call the forward in the iplanet servlet like this

    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher( "/signatureok.jsp" );
    if( dispatcher != null ) {
      dispatcher.forward( req, res );
    }

    and we get this error in the iplanet log :
    [04/Jun/2004:17:26:31] failure ( 1472): trying to POST /signatureok.jsp, wl-proxy reports: IO error reading client POST data at line 314 of proxy.cpp, system error: 'Resource temporarily unavailable'
    [04/Jun/2004:17:26:31] warning ( 1472): RequestDispatcher: forward call failed

    Url to forward ends with jsp, so iplanet gives the request to weblogic (wl-proxy in the log), but wl-proxy gives an error. Finally, the client gets an Error 500.

    Why wl-proxy doesn't find the resource ?
    thanx in advance for your advices.
  2. As a rule, you can only forward between components in the same web container. Since the IPlanet servlet and the Weblogic JSP are in different JVMs, the forward operation fails.

    If possible, I suggest you switch to a client-side redirect: response.sendRedirect(). That should work regardless of where the components are located.
  3. Hi,

    The forward between IPlanet and Weblogic works when we forward to a "real" jsp (served by Weblogic).
    The only difference is that, in this case, we use a servlet declared in the weblogic.properties.
  4. If you can forward to a "real" JSP in weblogic, why don't you create a "/signatureok.jsp" JSP, and then have the JSP forward to your servlet. That way, your forward operation happens in a single container.