• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Tomcat unable to locate the Servlet class

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am facing a quite strange problem with Tomcat. I have written a small web application, which i can successfully launch and run in weblogic server. But, when try to run the same in Tomcat, i am getting HTTP 404 error. I could access by jsp pages successfully. Below given my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>MessageSecurity</display-name>
<servlet>
<servlet-name>compressdecompress</servlet-name>
<servlet-class>com.messagesecurity.servlet.CompressDecompressServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>compressdecompress</servlet-name>
<url-pattern>/compress</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/login.html</welcome-file>
</welcome-file-list>
</web-app>

URL i used to access my app. is "http://localhost:8080/MessageSecurity/compress", where "MessageSecurity" is my context root under $TOMCAT_HOME/webapps directory.

My tomcat version is 5.0.28. Kindly let me know, where i am going wrong.

Thanks a lot for your time and advice.

thanks and regards,
ravi.
[ February 20, 2006: Message edited by: Ravikumar Jambunathan ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where did you put the CompressDecompressServlet class ?
[ February 20, 2006: Message edited by: Satou kurinosuke ]
 
Ravikumar Jambunathan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks for your feedback.

The class file is under package specific dierctory that is,

$TOMCAT_HOME\MessageSecurity\WEB-INF\classes\com\messagesecurity\servlet directory. As i mentioned, the application is running fine in weblogic server. I am facing this problem only with Tomcat.

Pl. let me know, if you require further details.

thanks and regards,
ravi.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At a quick glance your configuration settings look good.
Can you see any errors/exceptions in the logs?
 
Ravikumar Jambunathan
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

Thanks a lot for your time and advice. I managed to resolve the problem. The problem was the web.xml filename was in upeer case like "WEB.XML". I renamed to "web.xml", now it is working fine. By the way, I have never read anywhere in Tomcat documention that web.xml naming is case sensitive. Seems, weblogic does not have this restriction.

However, thanks a lot once again.

thanks and regards,
ravi.
[ February 21, 2006: Message edited by: Ravikumar Jambunathan ]
 
Can you smell this for me? I think this tiny ad smells like blueberry pie!
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic