1-20 of 145
Previous
Next |
JSF Backing Bean Tips: Parameter Extractions and Redirects
by Leonard Anghel
These two quick JSF bean backing tips show how to extract request parameters and redirect page loads.
|
Java Code to Filter File Names in a Directory
by deniz mermerci
Using this Java code snippet, you can filter file names for array of extensions, split the file names, and test the resulting array.
|
Managed Classes and Object Injection in Java EE 5
by Anghel Leonard
Get a quick reference for what types of managed class can inject what object in Java EE 5.
|
Managing Concurrent Requests with EJB Containers
by Anghel Leonard
A limitation of EJB containers is that they can't serialize complex objects. Find out how the PrePassivate and PostActivate methods overcome this shortcoming.
|
Using EJB Interceptors for Java EE Audits
by Leonard Anghel
With EJB interceptors, you can access the name, parameters, and EJB context of business methods.
|
Java Tip: Optimization Technique for Lists
by Deepak Tyagi
An ArrayList that is not initialized with the proper size can slow your Java application's performance.
|
Static Class Values Are Valid Even Without a Main Method
by Mannu Saini
This example shows how a static block can work even without a main method.
|
Using Tree(Map,Set) in Collections
by Sivaranjani Duraisamy
To add objects to a Tree(Map, Set), implement the Comparable.compareTo method.
|
A Guide to Determine When You Need a Java Interface
by Rajasekaran Kandhasamy
You definitely need an interface if your needs match either of the two scenarios discussed in this tip.
|
Using String.split(String) vs. Using a StringTokenizer
by Hrudananda Pattanaik
It's not always safe to use String.split(String). Consider using the String Tokenizer API instead.
|
Achieve Syntax Brevity with Anonymous Classes and Instance Initializers
by Abdul Salam
Shorten your code using these techniques.
|
Execute DOS Commands from a Java Program
by Hrudananda Pattanaik
Use this tip to run DOS commands from your Java Program on Windows.
|
Comparing Constant Strings with String Variables
by Ritesh Patel
Avoid NullPointerExceptions by comparing string constants with string variables—not the other way around.
|
Understanding Java's Integer Pool Can Avoid Problems
by Shreyas Pai
When apparently-equal integer values fail an equality test, remember the integer pool.
|
Returning Zero-Length Arrays in Java
by Nagaraj Ramesh
Define a static final zero-length array and return that rather than null from methods that return array types.
|
Simple Script to Run Java Applications on Linux and Windows
by Bea Petrovicova
This simple script lets you run a Java application on both Linux and Windows.
|
How to Detect JFrame Resizing
by Sterling Jordan
To know when a user is resizing a JFrame, catch the resize action using this tip's code.
|
Use a Validator to Validate a DOMSource
by Leonard Anghel
This code snippet creates a Validator that you can use to validate an XML document represented as a DOMSource.
|
How to Iterate Through All the Properties of a Class
by Deepak Choudhari
Using Reflection, you can easily iterate through all the properties of a .NET class.
|
Send a Cookie to the Server Using the setRequestProperty Method
by Leonard Anghel
You don't need a browser to send a cookie to a server. This tip shows you how to do it from Java code.
|
1-20 of 145
Previous
Next |