准备index.jsp
<html>
<link rel="stylesheet" type="text/css" href="layout.css"/>
<body>
<h1>Login</h1>
<br/><br/>
<form action="login.jsp" method="post">
User Name: <input type="text" name="user"/> <br/>
Password: <input type="password" name="password"/> <br/>
<input type="submit" value="login"/>
</form>
</body>
</html>
login.jsp
<%
String userName = (String)request.getParameter("user");
response.setContentType("text/html");
out.println("<h1>Hello, " + userName + "</h1>");
%>
将这两个文件发布到tomcat的应用中。
下载jmeter,配置成功后,打开jmeter