摘要:
EncodingFilter.java代码:package com.demo.servlet;import java.io.IOException;import javax.servlet.Filter;import javax.servlet.FilterChain;import javax.servlet.FilterConfig;import javax.servlet.ServletException;import javax.servlet.ServletRequest;import javax.servlet.ServletResponse;import javax.servlet 阅读全文
摘要:
虽然是小小的成功心理也很开心~~!保存代码:这里是与数据库交互:login.jsp <% String name=request.getParameter("name"); String pwd=request.getParameter("pwd"); UserBean ub=new UserBean(); if(ub.isExist(name)){ //用户是否存在 if( ub.valid(name, pwd)){ //密码是否正确 out.print("欢迎登陆:"+name); }else{ out.print(&quo 阅读全文