编写jsp时,Sun公司提供了便利,request、response、out、session、application、config、pageContext(代表本页)可以直接用,叫做隐式对象。想想jsp会被转成一个Servlet,这些对象就自然会用了。
例 2.1
a.html:
<html>
<body bgcolor="red">
<form action="jsp1.jsp">
Customer Name: <input type=text name=text1>
<input type=submit value=Enter>
</form>
</body>
</html>
jsp1.jsp
<html>
<body bgcolor=green>
<%
String name=request.getParameter("text1");
%><font color=red>
jsp隐式对象都包括什么?包括request、response、out、session、application、config、pageContext。
猜你喜欢
转载自blog.csdn.net/mark_to_win/article/details/84833973
今日推荐
周排行