JSP 程序设计上机实验与综合实训 部分实验代码(65 页)Good is good, but better carries it.精益求精,善益求善。第 1 章实验biao.jsp<%@ page contentType="text/html;charset=GB2312"%>
乘法表 <% for(int j=1;j<=9;j++) { for(int i=1;i<=j;i++) { int n=i*j; out.print(i+"×"+j+"="+n+" "); } out.print("
"); }%> 第 2 章实验 1inputWord.jsp<%@ page contentType="text/html;charset=GB2312"%> showDictionary.jsp<%@ page contentType="text/html;charset=GB2312"%><%@ page import="java.util.*"%><%! TreeSetdictionary=new TreeSet(); public void addWord(String s) { String word[] = s.split(" "); for(int i=0;i <% String str = request.getParameter("word"); addWord(str); Iteratorte=dictionary.iterator(); while(te.hasNext()) { String word = te.next(); out.print(" "+word); }%>实验 2leader.txt<%@ page contentType="text/html;charset=GB2312"%>链接到页面 1链接到页面 2链接到页面 3first.jsp<%@ page contentType="text/html;charset=GB2312"%> 这是页面 1 <%@ include file="leader.txt" %>
second.jsp<%@ page contentType="text/html;charset=GB2312"%> 这是页面 2 <%@ include file="leader.txt" %>
third.jsp<%@ page contentType="text/html;charset=GB2312"%> 这是页面 3 <%@ include file="leader.txt" %>
实验 3giveFileName.jsp<%@ page contentType="te...