Hi,

I'm trying to define an initial context which allows me invoking my servlets
by calling them from the root location of my Webserver (eg.
http://localhost/). This is actually not a problem if I invoke a Servlet by
calling it this way:

        http://localhost/htdocs/servlet/EditStudent

What I actually want is to be able to call my servlet (which is located
under /www/htdocs/WEB-INF/classes/) just by calling is this way:

        http://localhost/servlet/EditStudent

rather than the way I described above which uses the 'htdocs' Context
directory on the URL.

I configured server.xml this way:

 <!-- <Context path=""  -->
        <Context path="/"
             docBase="/www/htdocs"
             crossContext="true"
             debug="0"
             reloadable="true"
             trusted="true" >
      </Context>

and also configured mod_jk.conf this way:

Alias / "/www/htdocs"
<Directory "/www/htdocs">
    Options Indexes FollowSymLinks
</Directory>

JkMount /servlet/*.jsp ajp13
JkMount /*.jsp ajp13

<Location "/WEB-INF/">
    AllowOverride None
    deny from all
</Location>

<Location "/META-INF/">
    AllowOverride None
    deny from all
</Location>

and everything worked fine (stoping, starting Tomcat, restarting apache,
...) till I went to http://localhost/ to realize that even if I saw all
files located under the 'htdocs' directory, I couldn't link them at all. The
webserver says "Not Found
The requested URL /index.html was not found on this server".

Funny, isn't it: I see the files on my broser, I also see that the mapping
of my Context worked, but there is no way ot invoke the html files.
Even more funny, was to advice that if I would call any of my servlets by
entering the URL by hand (http://localhost/htdocs/servlet/EditStudent), the
servlets would respond.

MY QUESTION IS: Is there any way to configure a Context which allows me to
access the htdocs/ directory directly (http://localhost/servlet/EditStudent)
without using the htdocs string on my URL and more important: without
interfering problems beetwen Apache and Tomcat which do not let me link any
more the html files located under htdocs/?
By the way: I don't want to include any servlet-alias in server.xml because
this means making aliases for each class and I plan to have plenty of
classes...

I know that my question is very long, but I rather giving a concise
explanation of my situation rather than making a question that nobody can
asnwer because of the lack of information.
I thank you very much for your interest and help.
Have a nice day.

Marc

mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to