1、编写两个JSP页面inputString.jsp和computer.jsp,用户可以使用inputString.jsp提供的表单输入一个字符串,并提交给computer.jsp页面,该页面通过内置对象获取inputString.jsp页面提交字符串,并显示该字符串的长度。
inputString.jsp的代码
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>输入字符串</title>
</head>
<body>
<form action="computer.jsp" method="get" name=form>
请输入一个字符串:<br><input type="text" name="str">
<br><input type="submit" value="提交" name="submit">
</form>
</body>
</html>
computer.jsp的代码
<%@ page language="java" contentType="text/html; charset&