This is actually a bit tricky and took some research into Apache.
Since the jsp files must be within Tomcat and cannot be under an apache
directory, you have to find another way of mapping / to a file.

So, this is the way:

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

## MOD_JK
LoadModule jk_module modules/mod_jk.so
JkWorkersFile /apache/conf/workers.properties
JkLogFile /apache/logs/mod_jk.log
JkLogLevel debug
AddModule mod_jk.c

<VirtualHost *:80>
        ServerName myserver.com
        DocumentRoot /apache/html/myserver
        ErrorLog /apache/logs/myserver_error
        CustomLog /apache/logs/myserver_custom myserver

        <IfModule mod_dir.c>
         DirectoryIndex index.jsp index.html
        </IfModule>

        <IfModule mod_alias.c>
           RedirectMatch   ((/.*|)/)$  $1index.jsp
        </IfModule>
        <Directory "/">
           Options Indexes MultiViews
           AllowOverride None
           Order allow,deny
           Allow from all
        </Directory>

        # Include File for Tomcat mod_jk
        JkMount /*.jsp  ajp13
        JkMount /*.do   ajp13

</VirtualHost>

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

The "mod_dir.c" is what you normally have.  Map index.jsp as the index.
I don't even think this section is necessary because of what "mod_alias.c"
does.

The "mod_alias.c" tells apache to change any request that ends in "/"
into a requst for "/index.jsp".  Then "mod_jk" sees the request for *.jsp
and points it to Tomcat.

Yes.  Weird.  I just figured this out about two weeks ago.  And it works
really
well.  When you click on http://myserver.com/  you will see the url change
into
http://myserver.com/index.jsp and then find Tomcat.

Give it a try and see if it works.


Charlie



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 12, 2002 4:19 PM
> To: Tomcat Users List
> Subject: Re: Directory Index
>
>
>
> Jack, I'm not sure I understand what you're asking but, in case I did
> understand your question correctly, try putting this into your web.xml
>
>   <welcome-file-list>
>     <welcome-file>
>       MyJspIndexPage.jsp
>     </welcome-file>
>   </welcome-file-list>
>
> Darya
>
>
> On Fri, 12 Jul 2002 [EMAIL PROTECTED] wrote:
> > I know that in Tomcat I can map servlets to the path "/" and that in
> > Apache I can set certain files to be "directory indexes"; however, I do
> > not know how to map a JSP to the path "/". Can anyone help? How do I map
> > JSPs to the path "/" or set them as "directory indexes"?
> >
> > Thanks,
> >
> > Jack
> >
> > --
> > 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]>
>


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

Reply via email to