Tip Bank

DevX

EncodeBase64 – Encoding a string to base64

‘ Returns the input string encoded to base64Private Function EncodeBase64(ByVal input As String) As String Dim strBytes() As Byte = System.Text.Encoding.UTF8.GetBytes(input) Return System.Convert.ToBase64String(strBytes)End Function

DevX

Set Attributes in a Servlet Request

Usually, you set attributes in a session and the attributes are available through out the session. If you want to limit the scope of an attribute to just a request,

DevX

The Beans Class

The standard Java library contains a host of valuable methods. Many of these are hidden away, such as Beans.isInstanceOf.This method belongs to the java.beans.Beans class. However, it’s an object version

DevX

Loading from the Classpath

If your application includes .properties files or images and you want to load them without hard-coding their location, store the files in the class path. Classes are stored in archive