[JSP] - frequently-used skills
2016-02-12 16:50
393 查看
Today I took use of JSP to create login page and loginFailed page for my project. Google is not absent again. I have not been approaching this for very long time, but they are basics and will become useful
one day.
1. Already defined variables
So you don't need to define again. But if you define your own variables with same name you will get duplicated variable exception at runtime.session, request and response. I know only these 3...
2. Redirect in JSP
<% response.sendRedirect (request.getContextPath () + "/login.jsp"); %>
3. Context path
I must google when I want to use it every time...And this time I want me to remember more than this.
<% request.getRequestURI() = request.getContextPath() + request.getServletPath() %>
4. Checking if user has login (with security realm authentication)
To be continued ......相关文章推荐
- Key-Value Coding
- iOS 【UIKit-转换坐标系(1)】
- durpal8+Acquia Dev Desktop安装问题处理
- hdu1503Advanced Fruits【最长公共子序列】
- LeetCode 96 Unique Binary Search Trees不同的二叉搜索树的个数
- Building Maintainable Software-java篇之Write Simple Units of Code
- Educational Codeforces Round 7 A. Infinite Sequence 水题
- POJ 2623 Sequence Median(水~)
- 303. Range Sum Query - Immutable LeetCode
- UIView不接受触摸事件的三种情况:
- Educational Codeforces Round 7(D)构造(STL deque)
- Light OJ 1126 Building Twin Towers (DP)
- Building Maintainable Software-java篇之Write Short Units of Code
- deque 双端队列。
- PHP:数组操作函数array_count_values()的实现
- ELK setup guide
- Java中序列化的serialVersionUID作用
- 【CodeForces 618B】Guess the Permutation
- HDU 3732 Ahui Writes Word(01背包转化为多重背包)
- E - Number Sequence(第二季水)