日期:2014-05-16 浏览次数:20342 次
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ include file="relativeURLSpec" %>
<jsp:include page="forward-result.jsp"> <jsp:param value="age" name="20"/> </jsp:include>
<jsp:forward page="forward-result.jsp"> <jsp:param value="age" name="20"/> </jsp:forward>
<%=request.getParameter("age") %>
<form id="login" method="post" action="jsp-forward.jsp"> <input type="text" name="username" /> <input type="submit" value="login" /> </form>
<jsp:useBean id="name" class="classname" scope="page|request|session|application"></jsp:useBean> <jsp:setProperty property="BeanName" name="propertyName" value="value"/> <jsp:getProperty property="BeanName" name="propertyName"/>
<% request.setAttribute("String attributeName","Object attributeValue"); request.getAttribute("String attributeName"); request.getParameter("String parameterName"); request.getParameterValues("String parameterName"); request.setCharacterEncoding("String characterEncoding"); response.sendRedirect("pageName"); response.getOutputStream(); session.setAttribute("String attributeName","Object attributeValue"); session.getAttribute("String attributeName"); application.setAttribute("String attributeName","Object attributeValue"); application.getAttribute("String attributeName"); application.getInitParameter("String attributeName"); exception.getMessage(); exception.getStackTrace(); out.print("data"); out.println(); //page代表该页面本身,通常没有太大用处。 pageContext.getServletContext(); pageContext.getServletConfig(); pageContext.getSession(); config.getInitParameter("String initParameterName"); config.getInitParameterNames(); //config对象更多的在servlet中有效,Jsp页面通常无需配置,也就不存在配置信息。 %>