File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes A page not found error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "A page not found error" Watch "A page not found error" New topic

A page not found error

Andria Davis

Joined: Nov 22, 2005
Posts: 4
I have aproblem,I have an HTML form its action is on a servlet and it inserts data in a database, When i run the HTML form it gives me the page not found error.
I checked on the servlets' path and on the JDBC statements and they are correct but it still gives me the same error.
So can anyone help me to solve it.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

if the URL were correct, you wouldn't be getting an error.

Please show us the servlet and servlet mapping declarations from the web.xml, as well as the form action from the HTML file. We also need to know what context path the app is deployed to.

The JDBC information is irrelevant.

[Asking smart questions] [About Bear] [Books by Bear]
Andria Davis

Joined: Nov 22, 2005
Posts: 4
***This is the servlet

***And this is the servlet mapping declarations from the web.xml file
- <servlet-mapping>

***And the form action from the HTML page is
<form name="form1" method="post" action="/Adler/Shopping.Form1">

***I wanna add a note here I'm using the IBM WebSphere Application Developer
V 5.1 is it relevant.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

The URL pattern does not match your form action.
Wouldn't that be the problem ?

[My Blog]
All roads lead to JavaRanch
Manoj Kumkumath
Ranch Hand

Joined: Dec 01, 2005
Posts: 71
Can you check if you have the servlet class name specified in web.xml as shown below?

Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Make sure you have the following defined. Also, the URL ppattern needs to map your form's action.

[ January 17, 2006: Message edited by: Bosun Bello ]

So much trouble in the world -- Bob Marley
I agree. Here's the link:
subject: A page not found error
It's not a secret anymore!