开发者

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜