• 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

servlet is not working properly

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please need help dealling with this problem.i have a Controll servlet that user id from a jsp page.the id is used to delete user data from a database and when i run my jsp page,the servlet does not use the id to delete user data from the database.i can figure what the problem could be.thanks for your usual attension
the jsp code

the servlet code

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea if this is related to your immediate problem, but your use of instance variables:


to hold user request specific data is bound to cause trouble eventually since any number of request threads could be executing the servlet code "at the same time."

Bill
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Issue would be using

request.getParameter("id")

. Id returns more than one record.
You may have to use .Try to print "id" value before using.
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

srinivas srinivasmeenavalli wrote:Issue would be using

request.getParameter("id")

. Id returns more than one record.
You may have to use .Try to print "id" value before using.



Its a radio button option any point time it will hold only one value.


Efekodo Kingsley, You are using Database connection within JSP its not a good practice.
JSP is for rendering views, you do retrieving of data in servlet and then use it in JSP.

Between are you getting any errors?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic