devxlogo

May 22, 2001

System.out Vs. System.err

System.out leads the output to the standard output stream (normally mapped to the console screen). System.err leads the output to the standard error stream (and, by default to the console,

Run Your RMI Implementation Under Java 2

If you’re running the client or server with Java 2, then you’ll need to specify a security policy file, to prevent SecurityExceptions being thrown. This policy file will allow your

Trim Multiple Spaces in a String to a Single Space

If a string has two or more consecutive spaces, this will bring them down to a single space. Private Function TrimToSingleSpace(strToTrim As String) As StringstrToTrim = Trim(strToTrim)Do Until InStr(1, strToTrim,

How to Read Client-Side Cookies From a Servlet

Reading cookies from a servlet is easy. You can gain access to any cookies sent by the browser from the javax.servlet.http.HttpServletRequest passed to the servlet’s doGet, doPost, etc methods. HttpServletResponse