考试试卷A卷
专业班级 学号 姓名
考试形式:开卷
单项选择题(题2分30分)
1JSP中定义方法需()元素
a) < > b) < >
c) < > d) <@ >
2 JSP页面编译创建()
a) applet b) servlet
c) application d) exe文件
3 Servlet中HttpServletResponse()方法Http请求重定外URL
a) sendURL() b) redirectURL()
c) sendRedirect() d) redirectResponse()
4 Servlet滤器生命周期方法中传递请求响应时web容器会调()方法
a) init b) service
c) doFilter d) destroy
5 定Servlet代码片段:
Public void doGet(HttpServletRequest requestHttpServletResponse response)
throws ServletExceptionIOException{
______
outprintln(hi kitty)
outclose()
}
运行次Servlet时输出:
hi kitty
应Servlet划线处填充代码
a) PrintWriter out responsegetWriter()
b) PrintWriter out requestgetWriter()
c) OutputStream out responsegetOutputStream()
d) OutputStream out requestgetWriter()
6 J2EE中关HttpServlet说法错误()
a) HttpServlet抽象类
b) HttpServlet类扩展GenericServlet类
c) HttpServlet类子类必须少重写service方法
d) HttpServlet位javaxservlethttp包中
7 顶JSP程序源代码:
twojsp中()代码片段输出参数location值
a)
b)
c)
d)
8J2EE中JSP EL表达式:s{(10*10) ne 100}值()
a) 0 b) True
c) False d) 1
9 定include1jsp文件代码片断:
< pageContextsetAttribute(UserHAHA)>
_______处填写代码
定include2jsp文件代码片断:
求运行include1jsp时浏览器输出:HAHA
满足条件jsp1jsp中划线处应填入()语句
a)
b) <@ include fileinclude2jsp>
c)
d) < responsesendRedirect(include2jsp)>
10 J2EE中webxml中代码
述代码定义默认会话超时时长时长30( )
毫秒 b) 秒
c) 分钟 d) 时
11 incjsp中包含数行代码张图片现创建homejsp次浏览homejsp时够快速度显示incjsp中容homejsp身显示容应该homejsp中语句( )
a) <@include file incjsp> b)<@include pageincjspflush true>
c)
12 Servlet里正确获取session语句()
a) HttpSession session requestgetSession(true)
b) HttpSession session requestgetHttpSession(true)
c) HttpSession session responsegetSession(true)
d) HttpSession session response getHttpSession (true)
13 定JSP程序源码该JSP运行输出结果( )
< int count 1> Count < ++count >
a) Count1 b) Count2
c) 12 d) Count
14 J2EE中request象( )方法获取页面请求中表单组件应值时户请求数
a) String getParameter(String name)
b) String[] getParameter(String name)
c) String getParameterValuses(String name)
d) String[] getParameterValues(String name)
15 J2EE中JSP隐式象()
a) pageContext b) context
c) application d) out
二填空题(题2分10分)
1 Tomcat服务器默认端口
2 JSP开发网站两种模式分________________
3 浏览器服务器提交请求常方式:
4 Web开发中常会话技术两种
5 JSP页面三指令
三简答题(题10分20分)
1JSP置象作分什
2简述Servlet生命周期
四说明题(题10分20分)
1简述JSP运行原理
2简述MVC设计模式 (画图加部分文字说明)
命题教师: 安露明 班级: Java12315 教研室(签字): 系(签字):
………………………………………………………………装…………………………………订…………………………………线………………………………………………
五编程题(20分)
采Servlet+JSP+JavaBean模式模拟网站登录页面
求:
(1) 写出JavaBean设计代码(5分)
(2) 写出Servlet代码webxml文件中Servlet配置代码(10分)
(3) 写出JSP页面代码成功登录页面显示:XXX登录成功(5分)
四川工商职业技术学院20132014 学年1学期JavaWeb技术
考试A卷答卷
专业班级 学号 姓名
单项选择题(题2分30分)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
二填空题(题2分10分)
1
2
3
4
5
三简答题(题10分20分)
1JSP置象什作
2什Servlet生命周期
命题教师: 安露明 班级: Java12315 教研室(签字): 系(签字):
………………………………………………………………装…………………………………订…………………………………线………………………………………………
四说明题(题10分20分)
1简述JSP运行原理
2简述MVC设计模式
五编程题(20分)
文档香网(httpswwwxiangdangnet)户传
《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
该内容是文档的文本内容,更好的格式请下载文档