This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes servlet is not working properly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlet is not working properly" Watch "servlet is not working properly" New topic
Author

servlet is not working properly

Efekodo Kingsley
Greenhorn

Joined: Mar 16, 2009
Posts: 6
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

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12683
    
    5
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


Java Resources at www.wbrogden.com
srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
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.
Mohamed Inayath
Ranch Hand

Joined: Nov 22, 2004
Posts: 124
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: servlet is not working properly
 
Similar Threads
Pool Manager with MySQL - JSP ... need help
Getting error
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
Login JSP page using mysql(DB)
page gets hang on runtime