2012年12月30日
摘要: goods.jsp<%@ page language="java" contentType="text/html; charset=gb2312" pageEncoding="gb2312"%><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-e 阅读全文
posted @ 2012-12-30 21:15 duhuawei 阅读(166) 评论(0) 推荐(0)
摘要: 数据库脚本:create database user_logingo use user_logingocreate table tb_user( id int identity(1,1) primary key, username varchar(20) not null, password varchar(20) not null, sex varchar(4) not null, question varchar(20), answer varchar(20), email varchar(20))set identity_insert tb_user on//可以显示插入自增字段的值in 阅读全文
posted @ 2012-12-30 16:55 duhuawei 阅读(579) 评论(0) 推荐(0)
摘要: web.xml配置信息 <filter> <filter-name>Myfilter</filter-name> <filter-class>com.filter.Myfilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>gb2312</param-value> </init-param> </filter> <filter-mappin 阅读全文
posted @ 2012-12-30 15:22 duhuawei 阅读(177) 评论(0) 推荐(0)
摘要: servlet请求页面:一直要注意路径问题,如果写成是/SimpleServlet则会到http://localhost:8080/SimpleServlet进行查找,而需要加 "."代表当前路径下查找就可以了。<form action="./SimpleServlet" method="post"> <input type="submit" name="submit" value="提交"> </form>web.xml配置信息如下。&l 阅读全文
posted @ 2012-12-30 11:08 duhuawei 阅读(170) 评论(0) 推荐(0)
摘要: <% String driverClass=application.getInitParameter("Driver"); String url=application.getInitParameter("url"); String user=application.getInitParameter("username"); String pwd=application.getInitParameter("password"); Class.forName(driverClass).newInstance() 阅读全文
posted @ 2012-12-30 09:33 duhuawei 阅读(532) 评论(0) 推荐(0)