惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 似水流年

html颜色代码对照表 - 似水流年 - 博客园 让jbuilder显示中文 mysql数据导入导出语句 如何去掉超链接的下划线 使用标记文件更新和查询数据库 用一个链接同时打开两个帧页 DisplayTag应用实践 Tomcat配置之自订tomcat Tag File简介 JS控制显示表单个数 Jsp+javascript打造二级级联下拉菜单 让tomcat支持中文Url传递 JSP文件操作 用MYSQL中的加密函数来加密:PASSWORD() 转义字符\的替换 - 似水流年 - 博客园 jsp中取得当前绝对路径的方法 Jstl申明DateSource jstl验证用户是否已登录 在调用删除页面是出现提示信息
Jstl验证用户登录
似水流年 · 2005-03-11 · via 博客园 - 似水流年

<sql:query var="query" dataSource="${bookdev}">
  select * from user where userName='${param.userName}' and userPwd='${param.userPwd}'
</sql:query>

<c:if test="${empty query.rows}"> 
<!--验证没有通过,返回登录界面-->
  <font color="red">用户名或密码错误</font>
  <a href="index.jsp">重新登录</a>
</c:if>
<c:if test="${!empty query.rows}"> 
<!--验证通过,保存用户信息到session中-->
<c:forEach var="row" items="${query.rows}">
    <c:set var="userName" value="${row.userName}" scope="session" />
    <c:set var="userLevel" value="${row.userLevel}" scope="session" /> 
 </c:forEach>
    <c:set var="isLog" value="1" scope="session" /> 
<!--页面发送到主页面-->
    <c:redirect url="main.jsp" />
</c:if>