You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rasika <ra...@silicomp.com.sg> on 2000/11/14 07:41:23 UTC

servlets problem is still there

Hello,
I have installed TOMCAT with Apache. I followed your user guide and then tomcat faqs to install tomcat.
Now I am able to run .jsp files using both tomcat as well as Apache. I can also run sample servlet provided alongwith examples. But I cannot run my own servlet.
I have stored itin webapps/root/web-inf/classes directory. 
I still don't understand which files need to be configured in order to run my servlets?
 
I have added following block to web.xml file
<servlet>
      <servlet-name>hi</servlet-name>
      <servlet-class>hi</servlet-class>
    </servlet>
         <servlet-mapping>
        <servlet-name>hi</servlet-name>
        <url-pattern>/hi</url-pattern>
        </servlet-mapping>
 
 
where "hi" is the name of my servlet file. But when I try to run it through browser giving command http://localhost:8040//hi where 8040 is apache port(which I have changed ) it gives me 404 error.
 
Can you please help me in configuring files so as to run my own servlets?
 
Thanks,
Rasikaj

Re: servlets problem is still there

Posted by miki <mi...@electricangels.com>.
Hi,

I've got the same problem as yours. So if you get the solution can you teach me how to make it work. Many thanks in advance.

Thanks,
Miki
  ----- Original Message ----- 
  From: Rasika 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, November 14, 2000 2:41 PM
  Subject: servlets problem is still there


  Hello,
  I have installed TOMCAT with Apache. I followed your user guide and then tomcat faqs to install tomcat.
  Now I am able to run .jsp files using both tomcat as well as Apache. I can also run sample servlet provided alongwith examples. But I cannot run my own servlet.
  I have stored itin webapps/root/web-inf/classes directory. 
  I still don't understand which files need to be configured in order to run my servlets?
   
  I have added following block to web.xml file
  <servlet>
        <servlet-name>hi</servlet-name>
        <servlet-class>hi</servlet-class>
      </servlet>
           <servlet-mapping>
          <servlet-name>hi</servlet-name>
          <url-pattern>/hi</url-pattern>
          </servlet-mapping>
   
   
  where "hi" is the name of my servlet file. But when I try to run it through browser giving command http://localhost:8040//hi where 8040 is apache port(which I have changed ) it gives me 404 error.
   
  Can you please help me in configuring files so as to run my own servlets?
   
  Thanks,
  Rasikaj

Re: servlets problem is still there

Posted by Dominique BATARD <db...@sf2r.fr>.
Did you try http://localhost:8004/servlet/hi ?

Dom
  ----- Original Message ----- 
  From: Rasika 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, November 14, 2000 7:41 AM
  Subject: servlets problem is still there


  Hello,
  I have installed TOMCAT with Apache. I followed your user guide and then tomcat faqs to install tomcat.
  Now I am able to run .jsp files using both tomcat as well as Apache. I can also run sample servlet provided alongwith examples. But I cannot run my own servlet.
  I have stored itin webapps/root/web-inf/classes directory. 
  I still don't understand which files need to be configured in order to run my servlets?
   
  I have added following block to web.xml file
  <servlet>
        <servlet-name>hi</servlet-name>
        <servlet-class>hi</servlet-class>
      </servlet>
           <servlet-mapping>
          <servlet-name>hi</servlet-name>
          <url-pattern>/hi</url-pattern>
          </servlet-mapping>

   
  where "hi" is the name of my servlet file. But when I try to run it through browser giving command http://localhost:8040//hi where 8040 is apache port(which I have changed ) it gives me 404 error.
   
  Can you please help me in configuring files so as to run my own servlets?
   
  Thanks,
  Rasikaj