GeeCON Prague 2014*
The moose likes JSP and the fly likes Problem storing form value into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "Problem storing form value into database" Watch "Problem storing form value into database" New topic
Author

Problem storing form value into database

upanshu vaid
Ranch Hand

Joined: Sep 07, 2012
Posts: 73

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
Marshal

Joined: Mar 22, 2005
Posts: 42031
    
  64
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".


Ping & DNS - my free Android networking tools app
 
GeeCON Prague 2014
 
subject: Problem storing form value into database