Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

form data

 
trinadh reddy
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Eddy Lee Sin Ti
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use code tags when posting code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic