"JSTL" Determines whether the value in the session is empty

Source: Internet
Author: User

[HTML]View Plaincopyprint?
  1. <span style="White-space:pre"></span><span style="White-space:pre">                           </span><c:if Test="${sessionscope.errorcode!=null}">  
  2. <span style="White-space:pre">                                </span><c:if Test="${sessionscope.errorcode==0}">  
  3. <span style="White-space:pre">                                </span>pswd error.
  4. <span style="White-space:pre">                                </span></c:if>  
  5. <span style="White-space:pre">                            </span></c:if>  

Beginner Jstl, the main purpose is to replace the front-end JSP code, make it all HTML tags appear beautiful some ...

is still very simple, first sessionscope get the domain, and then determine whether errorcode is empty, I am here to determine whether the user login information is correct, through the servlet if the user information is wrong, the session will put a errorcode, Then to the front to determine the value of this errorcode, and according to the size of the value to display the relevant data

Here it is determined that if the value is 0, the user password is incorrect.

"JSTL" Determines whether the value in the session is empty

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.