aspose file tools*
The moose likes Tomcat and the fly likes Question reg Tomat5.0/Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Question reg Tomat5.0/Apache" Watch "Question reg Tomat5.0/Apache" New topic
Author

Question reg Tomat5.0/Apache

Kitty Dayal
Ranch Hand

Joined: Jul 22, 2004
Posts: 89
Hi all,

I have couple of questions.

1. I know tomcat is a JSP/Servlet engine used to run my jsp/servlet's and Apache is a web-server. I have Tomcat5.0 installed couple of days back. I did some configuration in the web.xml file to change the default http-port from 8080 to 8021. Does tomcat5.0 come with Apache built-in OR when I execute the pages am i executing directly from the engine. I am not able to sink in the true difference betn an engine and a web-server. I have seen couple of posts regarding connecting tomcat with apache/IIS, why do we need it?( It might be a very beSICK question, but I want to know about it)

2. I tried to run my servlets and get this error(with tomcat 5).

HTTP Status 404 - /servlet/coreservlets.HelloWorld

type Status report

message /servlet/coreservlets.HelloWorld

description The requested resource (/servlet/coreservlets.HelloWorld) is not available.


But when i configure web.xml and then run it, it works fine. Do i need configure web.xml everytime I run new servlets. OR Is there a better way.

Thanks a lot,
Kits
Apache Tomcat/5.0.28
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Kitty,

Sailing in the same boat. I too am tryin to differentiate between Tocat and Apache.....

As far as I know, Servlets need to be mapped in the Web.xml file, with their respective classes. So, if u write a new servlet into ur application, you have to enter the details into ur web.xml for that application.

All the more, once entereed, it need not be altered for successive runs.

Say, your servlet is MyServlet.java. You compile and get MyServlet.class

Now, in ur web.xml, u have to tell Tomcat, which is the servlet class to load? and what is the name and the URL Pattern, to call the servlet. All these are mandatory entries for the servlets.

HTTP Status 404 - /servlet/coreservlets.HelloWorld

type Status report

message /servlet/coreservlets.HelloWorld

description The requested resource (/servlet/coreservlets.HelloWorld) is not available.


Such an error occurs for me due to some error in the mapping. A new Servlets need to be mapped.

Well.....
This is what i know, from my side. Any ways, more inputs on this are welcome.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

mapping each servlet is the way to go.

the /servlet mapping that no longer works is the 'invoker servlet'. Read about it here:
http://faq.javaranch.com/view?InvokerServlet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question reg Tomat5.0/Apache