File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat 6.0.26 & IIS 7.0 - 404 - File or directory not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 6.0.26 & IIS 7.0 - 404 - File or directory not found" Watch "Tomcat 6.0.26 & IIS 7.0 - 404 - File or directory not found" New topic
Author

Tomcat 6.0.26 & IIS 7.0 - 404 - File or directory not found

m Shultz
Greenhorn

Joined: Jun 01, 2010
Posts: 3
hi there
I'm sure this has been answered or at least dealt with, so my apologizes ahead of time, but i just spent over 4 hrs today trying to figure this out and still can't seem to find the answer anywhere.

We recently got a new server, and would like to run an application with Tomcat on it. So we installed
- IIS 7.0
- Java JRE 6u20 (C:\Java)
- Tomcat 6.0.26 (C:\Tomcat)

I followed the steps in this tutorial (http://www.iisadmin.co.uk/?p=72) which seemed quite explicit and easy to follow. It's just that now ... when we try to access servlets over the web, we can't loose the 404 error message.
---
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
---

I've followed the steps in several threads

http://www.coderanch.com/t/362081/Servlets/java/Tomcat-requested-resource-not-available
http://www.coderanch.com/t/359955/Servlets/java/HTTP-Status-servlet-error-requested

and also in the FAQ
http://faq.javaranch.com/view?InvokerServlet

but can't seem to be able to get anywhere.


We've been looking at the Hello World example.
If we comment out the servlet-mapping (just as a test) - the localhost:8080 no longer works.



So i put the comments back in - works again.


We shouldn't have to do that anyway since the servlet mappings and and servlet declarations are already in place in the web.xml file under:
C:\Tomcat\webapps\examples\WEB-INF

copy from this file:

...

(other servlets)

...

(other mappings)


Any thoughts would be appreciated.
Thanks much


p.s. we've been struggling on this for a pretty long time
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
What URL do you use to access your application? Does your application work when you try to access it directly from Tomcat? Have you checked log files?
m Shultz
Greenhorn

Joined: Jun 01, 2010
Posts: 3
Misha Ver wrote:What URL do you use to access your application? Does your application work when you try to access it directly from Tomcat? Have you checked log files?


It works fine when we use the following URLs:

http://localhost/examples/servlets/servlet/HelloWorldExample
http://localhost:8080/examples/servlets/servlet/HelloWorldExample
even
http://server_ip/examples/servlets/servlet/HelloWorldExample


However, as soon as we use IIS to assign a domain name to that IP and point the website record to the appropriate folder
(C:\Tomcat\webapps\examples)

in spite of the fact that the HTML pages continue to display properly, the .jsp pages fail with a 404 error.
URL: http://domain_name/servlets/servlet/HelloWorldExample



The log files don't seem to have very specific content either. Could you tell me which file to look for?
I'm looking in: C:\Tomcat\logs and i don't see anything that would point to errors:
I looked at: isapi_redirect.log, localhost.2010-06-02.log, manager.2010-06-02.log

Thank you for your input.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Perhaps you could check IIS logs, to see where it sends request
m Shultz
Greenhorn

Joined: Jun 01, 2010
Posts: 3
Misha Ver wrote:Perhaps you could check IIS logs, to see where it sends request


The IIS logs just simply state the GET requests it seems. No failures are recorded in these logs.
Not sure what to think
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 6.0.26 & IIS 7.0 - 404 - File or directory not found
 
Similar Threads
executing servlets in apache tomcat
Servlet Mapping problem - please help
HTTP error 404 when mapping for the invoker servlet is uncommented
I am not able to Run Head First servlet example
Servlet example - error 404: how to resolve? (what is wrong?)