第1章
实验
biao.jsp
<%@ page contentType=\
乘法表 <% for(int j=1;j<=9;j++) {
for(int i=1;i<=j;i++) {
int n=i*j;
out.print(i+\ }
out.print(\ } %>
for(int j=1;j<=9;j++) {
for(int i=1;i<=j;i++) {
int n=i*j;
out.print(i+\ }
out.print(\ } %>
第2章
实验1
inputWord.jsp
<%@ page contentType=\
showDictionary.jsp
<%@ page contentType=\<%@ page import=\
<%! TreeSet
String word[] = s.split(\ for(int i=0;i dictionary.add(word[i]); } } %> <% String str = request.getParameter(\ addWord(str); Iterator String word = te.next(); out.print(\ } %> 实验2 leader.txt <%@ page contentType=\ first.jsp <%@ page contentType=\ 这是页面1 <%@ include file=\
<%@ page contentType=\
这是页面2
<%@ include file=\
third.jsp
<%@ page contentType=\
这是页面3
<%@ include file=\
实验3
giveFileName.jsp
<%@ page contentType=\
读取名字是ok.txt的文件:
readFile.jsp
<%@ page contentType=\<%@ page import=\
This is readFile.jsp. <%
String s= request.getParameter(\ File f=new File(s); if(f.exists()) {
out.println(\文件\的内容:\ FileReader in=new FileReader(f);
BufferedReader bIn=new BufferedReader(in); String line=null;
while((line=bIn.readLine())!=null) {
out.println(\ } } else { %>
value=\ %>
<%@ page contentType=\
This is error.jsp. <%
String s= request.getParameter(\ out.println(\本页面得到的信息:\ %>