Hello Krishnan,
Monday, August 07, 2000, 7:01:58 AM, you wrote:
K> Hi all,
K> I have installed apache 1.3.9 and tomcat 3.1. I am able to run the examples stored
under tomcat directory by both using the following url.
K> http://localhost/examples/servlet/helloWorld and
K> http://localhost:8080/examples/servlet/helloWorld
K> Now, i created a new context called "kicha" and added that in the server.xml file.
Similarly, i created one folder called web-inf and created one file called web.xml
file. Now, i am able to run my
K> jsp and servlet by typing the following url.
K> http://localhost:8080/kicha/servlet/helloWorld . But when i try the following url
K> http://localhost/kicha/servlet/helloWorld , i am getting error for both jsp and
servlets that "The requested URL /kicha/helloWorld.jsp was not found on this server".
K> Tomcat is able to run my program, where is apache is not able to do that.
K> Can you please tell me that where i am going wrong.
You must place whole path in package to your class or add <servlert>
section to web.xml in web-inf directory. For example:
1. whole path in URL
you have class helloWorld in package your.own.package
http://localhost:8080/kicha/servlet/your.own.package.helloWorld
2. add <servlet> section to web.xml:
<servlet>
<servlet-name>
helloWorld
</servlet-name>
<servlet-class>
your.own.package.helloWorld
</servlet-class>
</servlet>
and use small url to servlet
http://localhost:8080/kicha/servlet/helloWorld
--
Best regards,
Oleg mailto:[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets