问题 I have a form in a jsp from which i am retrieving data to servlet via doPost method, suppose username and password now there is an empty textarea field inside the same form where i want to send the username from servlet,how do i do it? 回答1: I don't really understand your case. But there're 2 common ways to send data from servlet to JSP: Request attributes : you can use this if data is transferred along a same request. request.setAttribute("username",obj); request.getRequestDispatcher("url")