I have a java class where i am using 1 method to insert values in database , after that insertion, i want to return something from that method to servlet and that servlet should display that information is added. i can get the information display but i don't know what to return and how that retun value will work in that servlet. plz help
I am not sure what the "big picture" here is, in other words may be there is a better way to do what you are doing. But, in general a servlet responds only to a client request on the web. Is this a web application ? -Sri
If I understand you correctly, you want a message to display in the user interface that says something like, "Update completed successfully" after the update has ocurred. So you have your servlet that calls a method that updates the database and returns the success or failure of the update to the servlet (or that's what you want to happen). More info is really neccessary about the structure of your application to be able to provide you with a really thorough response. Are you using JSP's or is your servlet writing HTML out to the client? Is the databse update code in the servlet itself? --BW
posted 15 years ago
thanks everyone i got the answer.
Normally trees don't drive trucks. Does this tiny ad have a license?