Hum, ForwardURICompat is what does the trick for me on Apache 1.3.x (as well
as including "index.jsp" in the Apache DirectoryIndex).  At least in my
case, this tricks Apache into sending the request to Tomcat as
"/myapp/index.jsp", so it doesn't do the redirect, and the browser is none
the wiser.

I'm guessing that it is because of your mal-formed "JkMount /*Servlet
worker1" directive.  I believe that this gets (quietly) translated to
"JkMount /* worker1", so mod_jk finishes the translation early.  You need to
specify one JkMount for each of your '*Servlet's (or use the ApacheConfig
Listener if you have a lot of them).

"Johnson, Garrett" <[EMAIL PROTECTED]> wrote in message
5DE7B60BFBA5D411B961000629D5225552D735@NYCCNDX3">news:5DE7B60BFBA5D411B961000629D5225552D735@NYCCNDX3...
> I'm sorry, I didn't make this clear.  I should've discussed my
environment:
>
> Win2K
> Apache 2.0
> Tomcat 4.1
> mod_jk installed.
>
> The question I have is, what am I missing?  I've changed the httpd.conf
> file, and now at the end it has:
>
> LoadModule jk_module modules/mod_jk.dll
> JkWorkersFile conf/workers.properties
> JkLogFile logs/mod_jk.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> JkMount /*.jsp worker1
> JkMount /*Servlet worker1
>
> However, this doesn't cut it.  I can't understand why... :(
>
> As for the RequestDispatcher/request.sendRedirect, yup, that's EXACTLY
what
> I needed.  SNIFF - I look at the j2ee API for hours and couldn't stumble
> across that. :D
>
> -----Original Message-----
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 10, 2002 5:32 PM
> To: Tomcat Users List
> Subject: RE: Tomcat/HTTPD Integration
>
>
> Garrett,
>
> > 1.  I've got a webapp sitting in the /webapps/ROOT directory, and I'd
like
> > to be able to access it using Apache HTTPD instead of Tomcat's built-in
> > server.
>
> Right.  You setup a connector, e.g., mod_jk, mod_jk2, mod_webapp.  Heck, I
> even have a case where I have mod_proxy being used (don't ask why --
archaic
> and going away, but it works)!
>
> ref:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/connectors.html
>
> > How do I both instruct Apache to serve up all requests for the root
> > directory to Tomcat, and how do I set up that alias to use MY index
> > page?
>
> It is easier than you think.  Check the docs for your connector of choice.
> The best documentation is probably for mod_jk.
>
> If you want a laugh, here is how you do it with mod_rewrite/mod_proxy:
>
> RewriteRule       ^/(.*)$   http://localhost:8080/$1     [P]
> ProxyPassReverse  /         http://localhost:8080/
>
> Again, *not* something I recommend.  [FWIW, you could use ProxyPass
instead
> of a rewrite rule, but there is a lot more going on that isn't shown
above.]
>
> > context.getRequestDispatcher("/start.jsp" );
> > how do I get the URL on the client side to reflect the forwarding?
>
> If you want the browser to go back to the start.jsp page, you send it
there
> with request.sendRedirect("/start.jsp"), not a RequestDispatcher.
>
> > Thanks in advance, kids...
>
> You're welcome gramps ...  ;-)
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to