02 2016 档案

摘要:在请求转发时,我们需要把一些数据传递到转发后的页面进行处理。这时就需要使用request对象的setAttribute()方法将数据保存到request范围内的变量中。 示例:创建index.jsp文件,使用Java中的try……catch语句捕获异常,将数据保存到request范围内的变量中: < 阅读全文
posted @ 2016-02-29 15:13 冷的锋刃 阅读(448) 评论(0) 推荐(0)
摘要:<与%之间不可有空格,但是后面可以有空格 <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <% String path = request.getContextPath(); String baseP 阅读全文
posted @ 2016-02-29 10:25 冷的锋刃 阅读(146) 评论(0) 推荐(0)
摘要:JSP是“java server pages”的缩写,java是一种编程语言,jsp只是相当于java里面的servlet部分,所以JSP技术是以Java语言作为脚本语言的。 JSP这门技术的最大的特点在于,写jsp就像在写html,但它相比html而言,html只能为用户提供静态数据 ,而Jsp技 阅读全文
posted @ 2016-02-29 09:09 冷的锋刃 阅读(200) 评论(0) 推荐(0)
摘要:创建自定义对话框: // 对话框构建器 Builder builder = new AlertDialog.Builder(this); // 创建出一个空的对话框 final AlertDialog dialog = builder.create(); // 加载自定义View布局 View vi 阅读全文
posted @ 2016-02-25 22:57 冷的锋刃 阅读(200) 评论(0) 推荐(0)