Get inode type in C
Here is a string representation of a path. But tell me, is it a directory? is it a file? maybe it's a symlink? perhaps there is nothing there at all.
Hi, I'm Brian. Welcome to my blog. Here I write about the things I've learned whilst creating stuff on the web.
I hope that you will find something noteworthy here, that will pique your interest, and that you will visit again soon.
Here is a string representation of a path. But tell me, is it a directory? is it a file? maybe it's a symlink? perhaps there is nothing there at all.
I've been working with JTE (Java Template Engine) templates in my latest Spring app. They are a joy to work with and feel like a more modern alternative to Thymeleaf templates. With Spring however there are some integrations that a Thymeleaf user would expect, that are missing when using JTE. Automatic form error association being one. So I have documented how to pass form errors to your jte templates below.
When submitting information via an HTML form, Spring Security requires the form to include a CSRF (Cross-Site Request Forgery) token. This token is generated by the Spring app and tied to the user's session. Spring will use it to verify that the form submission is legitimate and not malicious. The token is required on POST, PUT, DELETE, and PATCH requests to protect against CSRF attacks. So when your user is submitting information, the form used to submit said information will need to contain a valid csrf token. This means adding a hidden field to the form that contains the token. In this post I'll demonstrate my reusable solution to this when using Spring and JTE.