You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GOMEZ Henri <hg...@slib.fr> on 2000/09/14 10:47:08 UTC

RE: mod_jk

We've got the problem with ajp13 and mod_jk :

If you use seems you need to use include instead of forward with
dispatcher :

protected final void callURI( HttpServletRequest pReq, HttpServletResponse
pResp, String pURI) throws IOException, ServletException {

        // verify URI
        if ( pURI.charAt( 0 ) != '/' )
            pURI = "/" + pURI;

        // get dispatcher
        RequestDispatcher lDispatcher =
this.getServletConfig().getServletContext().getRequestDispatcher( pURI );

        // verify dispatcher
        if ( lDispatcher == null ) {
            throw( new ServletException( "dispatcher not found" ) );
        }

		// Don't works with AJP13
              // lDispatcher.forward( pReq, pResp );

		// Works with AJP12 & AJP13 for tomcat 3.2
		lDispatcher.include( pReq, pResp );
    }


-
Unix is like a tipi -- no Gates, no Windows, and an Apache inside. 

>-----Original Message-----
>From: Tomas Westin [mailto:tech@space2u.com]
>Sent: Wednesday, September 13, 2000 2:18 AM
>To: tomcat-user@jakarta.apache.org
>Subject: mod_jk
>
>
>
>Hello,
>
>When using mod_jk and ajp13(with the necessary 
>WAS_BORN_BY_APACHE changes
>to enable it to co-exist php etc) with apache and tomcat 3.2 b3 mod_jk
>sometimes seems to deliver the wrong name for the requested file to
>tomcat, thus resulting that an entirely different file than the one
>requested is served to the browser
>
>This occur at random intervalls, maybe one time of ten or 
>twenty requests,
>more frequently if you reload a speciall file often, i.e if you hit
>refresh on test1.jsp say 50 times you have a bigger chance of 
>getting the
>output of test1.jsp when you request test2.jsp than if you 
>would just make
>one or two requests to test1.jsp before you request test2.jsp, 
>sometimes
>it will return a internal server error, but that is much more rare
>
>When JSP pages or Servlets are access through tomcat on port 8080 this
>problem does not appear at all, which quite effectivly narrows 
>it down to
>mod_jk, having port 8080 open is not such a nice solution though. Has
>anyone else experienced this? Or have any hints regarding it 
>whatsoever?
>
>regards Tomas
>
>