The blank line after JSP directive issue has been tackled from JSP 2.1 version and above. To sort this thing out just set the property trimDirectiveWhitespaces="true" which is set to false by default....
Read More
To get just the key...
Read More
BeanProcesor is an Apache API that helps us copy all the values from a Resultset to a bean. It uses reflection and unless you need an extremely optimal code it highly recommended to uses because it reduces development time....
Read More
Sometimes we may need to use a servlet to download mp3 files or other files not to play them or reproduce them. Most browsers understand the application/force-download content type header which does the trick....
Read More
There are many ways of getting the linux distribution in Java. Here you can find some examples that may suit your needs....
Read More
In java the three main Streams stdin (standard input) , stdout (standard output) and stderr (standard output error) are handled by default by System.in, Sytem.out and System.err respectively. Sometimes we may need to change the output according to our needs, this can be done in many ways such us using the OS to tell what stream we need to use or using java to set what streams we want to be used....
Read More
If you use java.net.URL to load url and in some cases you want to add a new protocol or if you want to use another API to handle certain protocols it is possible to do it. In this example I'm overriding the FTP protocol so that it is handled by the org.apache.commons.net.ftp.FTPClient API...
Read More
This example shows how to connect to an URL using just java sockets. You may want this for a number of reasons....
Read More
I wrote this post to show I solve this exception. There are a number of reasons why this error may come up and there is not a universal solution for all cases. Perhaps your are not using the same technology as me but you can find some clues here that may help you find a solution....
Read More
Sometimes we may need to save our objects out of the RAM scope. The act of storing objects outside the RAM is called persistence....
Read More