The wrong question of Jfinal's token

Source: Internet
Author: User

Backstage to prevent duplicate login verification, the front desk cope a bit, the result token has been bad use, very depressed .... Tangled

It turned out to be a problem with the form submission.

First of all:

1. Enter the first page will enter the interceptor, this will create tokens

public void intercept (Actioninvocation ai) {//create token, here is a value for the token to be entered into the page, and the Refresh page will change Ai.getcontroller (). creat        Etoken ("Blogtoken");    Ai.invoke (); }

The page has a hidden field placed in this token with the "Note that this hidden field should be placed inside the form form"

Here at the front desk I use AJAX asynchronous commit, so with the data back to the value of the table is fastidious

data:$ (' #myform '). Serialize (),

MyForm is the ID value of my form. As for the username and password, as usual.

That's right!

The wrong question of Jfinal's token

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.