First of all my tomcat is running very fine, I am able to run the servlets given as example in my tomcat server at http port 8080. But I am facing one problem that how can I run the servlets made by me ??? where should I place it in the tomcat directory i.e. html file and class file of servlet should be addressed with what thing http://localhost:8080/examples/servlets/***.html(is it right) Plese guide me.
Assume MISApp is your servletContext(Web appln ROOT) name.
regds maha anna [This message has been edited by maha anna (edited December 25, 2000).]
Joined: Jan 31, 2000
Hi Navodit, Please re-register with 'firstName lastName' format. Java ranch is trying to adopt a naming policy as described in www.javaranch.com/name.jsp . Thanks for your understanding. regds maha anna
It is a lot easier to use the batch file that is in the sample application of tomcat. Change the XML file to register your servlet and run the batch file. You can modify the batch for the directories to be created under webapps or copy them over there if u are lazy like me. Best of luck.
Joined: Dec 03, 2000
Dear MahaAnna I am tring simple servlet having one class file and on html file And as u said I made C:\tomcat\webapps\MISApp\WEB-INF\classes\serv1.class above directories and put my servlet class file named serv1.class in abobe directory and used the URL http://localhost:8080/misapp/serv1 But my server reported error: Error: 404 Location: /misapp/serv1 File Not Found /misapp/serv1 So what should I do Rest as u said i am changing my regd name. Thanx for reply, Navodit
Joined: Jan 31, 2000
Navodit, I am really sorry about a typo in my previous post. We have to put /servlet in our url. There is another way to make alias. I will explain that later. But for now you please type the url as [I also edit my previous post.] http://localhost:8080/misapp/servlet/serv1 Also don't forget to change your name as 'firstName lastName' foramt. Just re-register yourself. regds maha anna
Res Madam, I have tried out the same URL , even then I get Error: 404 Location: /misapp/servlet/ File Not Found /misapp/servlet/ I am running TOMCAT server through C:\tomcat\bin\startup.bat and then as u said I put myservlet in Directory C:\tomcat\webapps\MISApp\WEB-INF\classes\serv1.class and my URL is http://localhost:8080/misapp/servlet/serv1 But staill same reply Error: 404 Location: /misapp/servlet/serv1 File Not Found /misapp/servlet/serv1 Navodit Garg:O
Ms Maha Anna Thanking u very much indeed, initially I had lost patiance that it wont work, but ur coordination has really made me successful in running tomcat Expecting same coopearation in future Thanxs a lot Navodit Garg