reset password
Author Message
sjayach
Posts: 9
Posted 14:04 Aug 18, 2015 |

 

Hello Professor,
 
I am getting the below CSRF token error in application page even though i am not using any csrf tag in Application page. Could you please give me an idea that why csrf token is displaying as null in the application page?
 
Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'
 
Thank you,
Suren
 
 
Last edited by sjayach at 14:05 Aug 18, 2015.
cysun
Posts: 2935
Posted 14:06 Aug 18, 2015 |

See this.

sjayach
Posts: 9
Posted 14:10 Aug 18, 2015 |

Professor,

My login form is working properly with the CSRF tag. I am getting this error when the applicant is apply for the job.

cysun
Posts: 2935
Posted 14:11 Aug 18, 2015 |

Add that hidden form field to your form.

sjayach
Posts: 9
Posted 14:15 Aug 18, 2015 |

Still I am facing the same issue even after adding the below line in the form. Also i am wondering why we need this in apply.jsp page.

      <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" />

 

Last edited by sjayach at 14:15 Aug 18, 2015.
cysun
Posts: 2935
Posted 14:21 Aug 18, 2015 |

Then I guess it's because you are trying to upload files in the form. Remove the hidden form field you just added and see this.

sjayach
Posts: 9
Posted 14:26 Aug 18, 2015 |

Thank you very much Professor. It's working now.