![]() |
#2
小轩子2007-08-06 18:03
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="java.io.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
try{
File file=new File("i.txt");
FileReader f=new FileReader(file);
BufferedReader b=new BufferedReader(f);
String s=null;
while ((s=b.readLine())!=null){
out.println(s+"<br>");
}
f.close();
b.close();
}catch (IOException e){
out.println("error!!!!!!");
}
%>
</body>
</html>
[此贴子已经被作者于2007-8-6 10:20:06编辑过]