This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes form data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "form data" Watch "form data" New topic
Author

form data

trinadh reddy
Ranch Hand

Joined: Sep 22, 2005
Posts: 58
I have a sample html form . i have written a servlet to retreive data from the form. but 404 error is comming.please see this

form1.html


servlet program




web.xml



please see this as iam unable to understand where is the problem

[ EDIT - Code tags added by Dave]
[ October 11, 2005: Message edited by: David O'Meara ]
Sudhakar Gaharwar
Greenhorn

Joined: Oct 10, 2005
Posts: 15
hi Reddy,
Everything is looking fine ..Try to do one thing give complete path in html file. I mean to say in case of using <FORM action=./showParam> just use complete path..Reply me soon
Thanks
[ October 11, 2005: Message edited by: Sudhakar Gaharwar ]
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
In the Form Element remove the dot and slash and letter "p" should be in small case. It should be the same as the url-pattern element.

<url-pattern>/showparam</url-pattern>
[ October 11, 2005: Message edited by: vishnu prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Eddy Lee Sin Ti
Ranch Hand

Joined: Oct 06, 2005
Posts: 135
You might need to code the context path into the form action attribute because the browser will not interpret your action value as relative to your context, instead the browser will interpret it to the root of your web server.

You might wanna use <c:url> action in JSTL to handle this issue for you.


SCJP, SCWCD, SCJWS, IBM 700,IBM 701, IBM 704, IBM 705, CA Clarity Technical<br /> <br /><a href="http://eddyleesinti.blogspot.com" target="_blank" rel="nofollow">http://eddyleesinti.blogspot.com</a>
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Please use code tags when posting code.
 
Consider Paul's rocket mass heater.
 
subject: form data
 
Similar Threads
how to declare....and pass parameters..
Create servlet to display results set
enum.hasMoreElements()
Problem:The requested resource (/ShowParameters) is not available
HTTP POST-Method not supported by this URL.