getting values from servlet to same html page
I have created 3 textboxes in HTML page and I gave 2 values for first two text boxes and send to a servlet and I want 开发者_如何转开发get result back in third text box. How can I do this?
You need to use JSP. Forward request from servlet to jsp setting daat in attribute.
in Servlet
request.setAttribute("attrName","Value");
now forward this request to jsp, and on jsp access this attrName
with
${attrName}
See
- Servlets
You can use JSP or AJAX,JavaScript to send the request to the servlet and receive the response to update the third textbox...
精彩评论