//读取配置文件 Configuration conf=new Configuration().configure(); //创建SessionFactory SessionFactory sf=conf.buildSessionFactory(); //打开session Session session=sf.openSession(); Transaction tx=null; ...
//读取配置文件 Configuration conf=new Configuration().configure(); //创建SessionFactory SessionFactory sf=conf.buildSessionFactory(); //打开session Session session=sf.openSession(); Transaction tx=null; ...
JavaScript方法: //查找第一个表单元素中name属性为oprate的元素,并赋值为传递过来的参数 //执行submit事件 function doSubmit(method) { document.forms[0].elements["operate"].value=method; document.forms[0].submit(); } 页...
//改写doGet方法public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {//转换为中文 response.setContentType("text/html;charset=GBK");...
request是jsp的一个内置对象,内置对象就是由web容器加载的一组类的实例。不用new去获取实例,而是直接在jsp页面使用的对象。 request对象的常用方法实例:1.指定请求的编码,在调用其他方法的前面使用,解决中文乱码。request.set...
、jsp连接Oracle8/8i/9i数据库(用thin模式)testoracle.jsp如下: <%@ page contentType="text/html;charset=gb2312"%><%@ page import="java.sql.*"%><html><body><%Class.f...
最新评论