devxlogo

Tip Bank

Easily Retrieve File Attributes

Sometimes, filenames may contain characters like “.” and file-extensions may not necessarily be always 3 characters long. This code provides a handy way to get file attributes in a foolproof

Execute a Process Without a Hang

You may have noticed that running a process from Java using Runtime.exec() sometimes hangs the process. This is true especially in those cases where the process runs in the background.

Closing JDBC Objects Explicitly Can Save You Headaches!

Most Java programmers close a connection with the database directly?without closing the ResultSet or Statement. For example, take a look at the following code snippet: try { Class.forName( “sun.jdbc.odbc.JdbcOdbcDriver” );

Implement a Link Using XSL

Let’s say your XML looks like this: default.aspx?ID=13 Now, you need to transform this tag via XSL to the HTML tag: . The following XSL will do the trick: new