|
|
|
|
Jsp&Servelet 学习笔记(2) |
作者:袁袁整理 来源:帝网科技 日期:2008年09月18日 点击数: |
1.2第一个jsp程序介绍: 1、 打开一个文本编辑器,或者一个jsp专用的文本编辑器能标出一些语法的高亮。 2、 如果你编写一个jsp来处理http请求那么。将会和编写html文件一样。 3、 一个jsp文件如果要包含一些Jsp命令(列如一个taglib)的话要在文件开头写上<%@%> 4、 你可以在你需要的地方输入一个普通的表单提交或者用户标签。 5、 保存文件时以.jsp为扩展名进行保存。在一个web应用中放在整个目录的顶层。既放在 Web-info同级目录下。 Example : // 表示注释内容 <%-- --%> <%-- use the 'taglib' directive to make the JSTL 1.0 core tags available; use the uri "http://java.sun.com/jsp/jstl/core" for JSTL 1.1 --%>//使用c:out标签http://www.knowsky.com/ <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%-- use the 'jsp:useBean' standard action to create the Date object; the object is set as an attribute in page scope --%>//在jsp中使用javabean指明其(id)对象和(java.util.Date)类. First JSPHere is today's date//使用表达式输出${data} http://blog.csdn.net/bruceleey/archive/2007/02/07/1503844.aspx 资料引用:http://www.knowsky.com/344083.html
|
|
|
|
|
|
|