首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

jsp 概略知识

2012-07-15 
jsp 概要知识jsp常用的知识点1.include %@ include filepath% ?pathfile相对路径或者绝对路径?2.%

jsp 概要知识

jsp常用的知识点

1.include <%@ include file="path"%> ?path=file相对路径或者绝对路径

?

2.<% ?...java code...%> java脚本 不建议使用

?

3.<jsp:include page="url"/> 先编译后在添加到被包括的页面,相比include 推荐使用

?

4.<jsp:forward page="url"/>跳转到某个页面,同一上下文的页面

?

5.<jsp:param name="参数名" value="参数值"/>常嵌套在其他标识中,比如jsp:forward中

?

6.out.print();out.println(); 向客户端输出信息

?

7.request request.getParameter("str");获取传递的参数值,很常用的方法

?

8.request其他获取客户端方法

?

9.response.sendRedirect(path);重定向

?

10.session session.setAttribute(name,obj);把信息保存到session范围内

session.getAttribute(name);removeAttribute(name);

?

11.application?

?

12.javaBean <jsp:userBean id="示例名" scope="范围" name="示例名"/>

<jsp:setProperty property="属性名" name="示例名"/>

?

13.el表达式:${requestScope.list} 获取信息

?

14.<c:forEach items="${requestScope.in}" var="key" varStatus></c:forEach>

?

?

更详细信息:http://docs.oracle.com/javaee/1.3/api/index.html? 官网资料,详细

热点排行