Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

HTTP Status 404

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTTP Status 404

My file structure is below; What do I need to do so that TOMCAT 4.1 recognizes there is a servlet. I have tried everything in the action, web.xml...

***When I ran the servlet examples that came with Tomcat, it works.***

testTomcat
|
|
WEB-INF
| |
| |___classes
| |
| |______testServlet.class
index.jsp

Thanks
[ April 20, 2006: Message edited by: Bear Bibeault ]
 
Marshal
Posts: 67273
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Place the servlet in a package other than the default.
2. Make sure that your mapping in the web.xml is correct.
3. Make sure thast your URL matches that mapping.
 
Adam Teg
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow that was fast

Ok here is what I know have
**********
URL calling servlet = http://localhost:8080/testTomcat/index.jsp
action = "../com/test/servlet.test" (I have tried different things here)
**********
WEB.XML
<servlet>
<servlet-name>test</servlet-name>
<servlet-class>com.test.servlet.test</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>/testTomcat/index.jsp</url-pattern>
</servlet-mapping>
************
PACKAGE
com.test.servlet.(test.class)

What am I doing wrong?

Thanks
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try removing the name of your web-app from the url-pattern, like this:

 
Adam Teg
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks that did it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!