Win a copy of Murach's MySQL this week in the JDBC and Relational Databases 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A page not found error

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
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.

Thanks
 
Sheriff
Posts: 67745
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Andria Davis
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
***This is the servlet


***And this is the servlet mapping declarations from the web.xml file
- <servlet-mapping>
<servlet-name>Form1</servlet-name>
<url-pattern>/Form1</url-pattern>
</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.

Thanks
 
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
The URL pattern does not match your form action.
Wouldn't that be the problem ?
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andria,
Can you check if you have the servlet class name specified in web.xml as shown below?


-Manoj
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you have the following defined. Also, the URL ppattern needs to map your form's action.

<servlet>
<servlet-name>Form1</servlet-name>
<servlet-class>adler.Form1</servlet-class>
</servlet>
[ January 17, 2006: Message edited by: Bosun Bello ]
 
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic