You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by R N <re...@hotmail.com> on 2000/02/16 02:36:24 UTC

Unable to create new context correctly

Hi again,

once again, apologies about the length of this mail

well, i fixed the earlier error I was getting(my fault, bad CLASSPATH). Now 
i'm trying add my own context, as suggested in section 2.3 of the HOWTO 
document. I tried method (a), basically just adding an "ApJservMount 
/<mycontext> /root" entry to tomcat.conf, but that  didn't work. also, there 
was a mail yesterday which mentioned that this method does not always work.
So i went to method (b). this is what i've done:

1. created apache139/htdocs/<mycontext> directory

2. placed my html files in htdocs/<mycontext>/html, with servlet links
    pointing to "../servlet/<myservlet>"(using POST method)
    i'm using the above path since that's what's being used in the
     examples/servlets/*.html files. i can only assume that entry
     for '/servlet/*' in etc/web.xml will hold true for all contexts.

3. placed my servlet classes in htdocs/<mycontext>/WEB_INF/classes.

4. created web.xml file in htdocs/<mycontext>/WEB_INF directory, essentially 
by copying the one from the tomcat/examples/WEB-INF dir, and replacing the 
servlet names.

5. added entry for '/<mycontext>' = "/fullpath/to/htdocs/<mycontext>"
   in server.xml

6. added ApjServMount /<context> /root
   <Locatin /<mycontext>/WEB-INF/ >
         Allowoverride None
         deny from all
    </Location>

7. restarted tomcat and apache

i can access my html files as 
"http://host:9000/<mycontext>/html/login.html". but when i click on
submit, i get the following error:

--------------
Error: 404
No detailed message
---------------------

the corresponding URL is "http://host:9000/<mycontext>/servlet/LoginServlet"

I'm guessing the servlet is not found. i tried different values for the 
servlet location in the login.html file, but they either come back
with the same error, or go to a totally different, and obviously wrong, 
path.

what am i doing wrong here? am i missing some steps in the config files?  I 
am able to access the servlet if i put it in the examples/WEB-INF/classes 
directory, and the login.html in the examples/servlets directory. I tried to 
mimic this same structure in  <mycontext>, but it just doesn't work.

any help will be appreciated.

rishi

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com