当前位置:首页 » 课程大全 » jsp课程设计题库

jsp课程设计题库

发布时间: 2021-02-19 02:31:58

❶ 《JSP程序设计》期末考试试题A

so easy!

❷ 求jsp通用试题库系统设计

已发出

❸ 谁有JSP在线试题库系统源代码

已发出

❹ 基于JSP的web题库系统中的随机抽取试题。数据库用的my sql。

这里用到了两个文件,一个jsp文件一个javabean文件,通过jsp中调用javabean可以轻松读取文本文件,注意请放置一个文本文件afile.txt到web根目录的test目录下,javabean文件编译后将class文件放到对应的class目录下(tomcat环境)。

Read.jsp

$#@60;html$#@62;
$#@60;head$#@62;
$#@60;title$#@62;读取一个文件$#@60;/title$#@62;
$#@60;/head$#@62;
$#@60;body bgcolor="#000000"$#@62;
$#@60;%--调用javabean --%$#@62;
$#@60;jsp:useBean id="reader" class="DelimitedDataFile" scope="request"$#@62;
$#@60;jsp:setProperty name="reader" property="path" value="/test/afile.txt" /$#@62;
$#@60;/jsp:useBean$#@62;

$#@60;h3$#@62;文件内容:$#@60;/h3$#@62;

$#@60;p$#@62;

$#@60;% int count = 0; %$#@62;
$#@60;% while (reader.nextRecord() != -1) { %$#@62;
$#@60;% count++; %$#@62;
$#@60;b$#@62;第$#@60;% out.print(count); %$#@62;行:$#@60;/b$#@62;
$#@60;% out.print(reader.returnRecord()); %$#@62;$#@60;br$#@62;
$#@60;% } %$#@62;
$#@60;/p$#@62;
$#@60;/body$#@62;
$#@60;/html$#@62;

//DelimitedDataFile.java bean文件源代码
//导入java包
import java.io.*;
import java.util.StringTokenizer;

public class DelimitedDataFile
{

private String currentRecord = null;
private BufferedReader file;
private String path;
private StringTokenizer token;
//创建文件对象
public DelimitedDataFile()
{
file = new BufferedReader(new InputStreamReader(System.in),1);
}
public DelimitedDataFile(String filePath) throws FileNotFoundException
{

path = filePath;
file = new BufferedReader(new FileReader(path));
}
//设置文件路径
public void setPath(String filePath)
{

ath = filePath;
try {
file = new BufferedReader(new
FileReader(path));
} catch (FileNotFoundException e) {
System.out.println("file not found");
}

}
//得到文件路径
public String getPath() {
return path;
}
//关闭文件
public void fileClose() throws IOException
{

file.close();
}
//读取下一行记录,若没有则返回-1
public int nextRecord()
{


int returnInt = -1;
try
{
currentRecord = file.readLine();
}

catch (IOException e)
{
System.out.println("readLine problem, terminating.");
}

if (currentRecord == null)
returnInt = -1;
else
{
token = new StringTokenizer(currentRecord);
returnInt = token.countTokens();
}
return returnInt;
}

//以字符串的形式返回整个记录
public String returnRecord()
{

return currentRecord;
}
}

❺ 动态网页设计(JSP)试题

B B C X D B X C

填空:
1.response
2.WEB-INF classes
3.BufferedReader PrintWriter
4.classes lib
5.网页地址/hello 这实在要调用Servlet的地方写HelloServlet
6.获得服务期回IP
7.页面跳转

X的想不起答来了

❻ 毕业设计jsp 试题库管理系统(详细)

做开发这么多年,我就没看懂你这句话到底是啥子意思

❼ 求一份JSP技术的题库管理系统源代码+MySQL数据库

小伙子代码写少了。

热点内容
武汉大学学生会辅导员寄语 发布:2021-03-16 21:44:16 浏览:612
七年级学生作文辅导学案 发布:2021-03-16 21:42:09 浏览:1
不屑弟高考成绩 发布:2021-03-16 21:40:59 浏览:754
大学毕业证会有成绩单 发布:2021-03-16 21:40:07 浏览:756
2017信阳学院辅导员招聘名单 发布:2021-03-16 21:40:02 浏览:800
查询重庆2018中考成绩查询 发布:2021-03-16 21:39:58 浏览:21
结业考试成绩怎么查询 发布:2021-03-16 21:28:40 浏览:679
14中医医师资格笔试考试成绩查分 发布:2021-03-16 21:28:39 浏览:655
名著赏析课程标准 发布:2021-03-16 21:27:57 浏览:881
北京大学商业领袖高端培训课程 发布:2021-03-16 21:27:41 浏览:919