I'm looking into some XSS prevention in my Java application.
I currently have custom built routines that will escape any HTML stored in the database for safe display in my jsps. However I would rather use a built in/standard method to do this if possible.
I am not currently encoding data that gets sent to the database but would like to start doing that as well.
Are there any built in methods that can help me to achieve this?