java security

CORS Filter for J2EE Application

j2ee

CORS (Cross-origin resource sharing) helps in making Javascript based AJAX request from one domain to another, requesting domain is different from the domain where the request is made. This type of request is by default forbidden at the browser level and if this type of requet is made without proper settings, they will result in some origin security policy error. ... Read More »

How to encode decode String in Java base64 Encoding

Java

Base64 Encoding Algorithm Base64 encodes String using an algorithm which uses 64 printable characters to replace each character in original string in an algorithmic sequence so that it can be decoded later. Base64 encoding prevents misuse of data by encoding it into ASCII format. Base64 is real simple and easy to use for simple encoding needs. There are more advanced ... Read More »

How to do Reverse DNS (rDNS) lookup in java

Java

What is Reverse DNS Lookup Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address using the Domain Name System (DNS) of the Internet. Computer networks use the Domain Name System to determine the IP address associated with a domain name. This process is also known as ... Read More »

How To Set Fake User Agent

Java

How to set fake user agent What is user agent? User agent is software agent that is acting on behalf of a user. For example, an email reader is a mail user agent, and in the Session Initiation Protocol (SIP), the term user agent refers to both end points of a communications session. User agent acts as a client in ... Read More »