Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem storing form value into database

 
upanshu vaid
Ranch Hand
Posts: 83
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I was just doing a form input using JSP and servlet and storing result in MySQL ,concern I am having is that in the JSP I am not able to map the element to servlet I am using
JSP CODE:


Part of Servlet Code:


 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For starters, your code is wide open to SQL injection attacks - you should be using a PreparedStatement. Secondly, you're literally inserting the string value "employeeid" instead of inserting the value of the variable "employeeid".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic