Question: how to transfer data from jsp to servlet?
Answer: You can append a query string to the URL when you obtain the request dispatcher, using "?" syntax with name = value pairs. For example: RequestDispatcher rd = sc. ... 
You can use the setAttribute() method of the HTTP request object. For example: request.