摘要: <%! //定义数据库驱动程序 //public static final String DBDRIVER = "org.gjt.mm.mysql.Driver"; public static final String DBDRIVER = "com.mysql.jdbc.Driver"; //数据库连接地址 public static final String DBURL = "jdbc:mysql://localhost:3306/test"; public static final String DBUSER = &quo 阅读全文
posted @ 2013-04-15 16:18 幻星宇 阅读(199) 评论(0) 推荐(0) 编辑
摘要: xml:<servlet> <servlet-name>initparam</servlet-name><!-- 与servlet-mapping相对应 --> <servlet-class> com.servlet.InitParamServlet </servlet-class> <init-param><!-- 配置参数 --> <param-name>ref</param-name> <param-value>www.test.cn</param-v 阅读全文
posted @ 2013-04-15 16:15 幻星宇 阅读(216) 评论(0) 推荐(0) 编辑
摘要: web.xml<filter> <filter-name>encoding</filter-name> <filter-class>com.filter.EncodingFilter</filter-class> <init-param> <param-name>charset</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping 阅读全文
posted @ 2013-04-15 16:13 幻星宇 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Oracle就不说了,Linux 是CentOS。1. 安装 httpd(apache)yum install httpd -y2. 安装 php, php-gd, php-mcrypt, php-pecl*yum install php php-gd php-mcrypt php-pecl* -y3. 安装 oci8pecl install oci8安装时输入oracle安装目录4.修改 httpd.conf找到User apacheGroup apache改成系统中的用户,如:User oracleGroup oracle5. 在/etc/php.d/下创建 oracle.ini 内容:; 阅读全文
posted @ 2013-04-15 16:05 幻星宇 阅读(198) 评论(0) 推荐(0) 编辑
摘要: java中客户端跳转使用的是:req.getSession().setAttribute("name", "李兴华");//设置session属性 req.setAttribute("info", "MLDNJAVA");//设置request属性 resp.sendRedirect("servlet/get_info.jsp");调用的是响应对象的sendRedirect方法。服务器端跳转使用的是:protected void doGet(HttpServletRequest req, Htt 阅读全文
posted @ 2013-04-15 09:31 幻星宇 阅读(567) 评论(0) 推荐(0) 编辑