<c:redirect>标签的使用代码例子
redirect.jsp
<%@ page contentType="text/html" pageEncoding="GBK"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <html> <head><title>redirect</title></head> <body> <c:redirect url="param.jsp"> <c:param name="GIS520" value="www.gis520.com"/> <c:param name="GISREN" value="www.gis520.com"/> </c:redirect> </body> </html>
param.jsp
<%@ page contentType="text/html" pageEncoding="GBK"%> <h3>GIS520参数:${param.GIS520}</h3> <h3>GISREN参数:${param.GISREN}</h3>
运行结果:
GIS520参数:www.gis520.com
GISREN参数:www.gis520.com