-
Recent Posts
- Follow softwarecave on WordPress.com
Archives
- December 2021 (1)
- October 2021 (2)
- April 2018 (1)
- March 2018 (3)
- February 2018 (1)
- February 2017 (4)
- December 2014 (3)
- November 2014 (2)
- August 2014 (1)
- July 2014 (2)
- June 2014 (2)
- May 2014 (2)
- April 2014 (5)
- March 2014 (9)
- February 2014 (11)
- January 2014 (6)
- September 2011 (1)
Categories
Category Archives: Java
How to handle HTML forms in Spring
Spring MVC is a part of Spring Framework which main purpose is to simplify development of web applications. In this article I would like to explain how to handle HTTP requests, render the web page and process simple HTML forms … Continue reading
Recursively walking directory using Java NIO
Sometimes you may need to recursively visit all files and subdirectories of given directory and perform some actions on it. The typical use case is searching files of a given type, copying or removing a directory including all its contents. … Continue reading
Calculating cryptographic hash functions in Java
Cryptographic hash function is an algorithm which takes block of data of arbitrary length as an input and outputs a short fixed-length sequence of bits (usually 128-512 bits) and which ideally should have following properties: it is very easy to … Continue reading
Posted in cryptography, Java
Tagged cryptographic hash, cryptography, hash function, Java, security
Leave a comment
How to parse XML documents using Streaming API for XML (StAX)
Streaming API for XML provides interface XMLStreamReader which gives a low-level but very efficient cursor-like API for reading XML documents. When using it we iterate over various events in XML document and extract information about these events. Once we are … Continue reading
Why I prefer Java over C++
C++ is a language I used for almost 2 years at work, for all my university projects except when there was an explicit requirement to use a different programming language and at home for very different tasks. The language alone … Continue reading
How to write XML documents using Streaming API for XML (StAX)
Nowadays XML became a de-facto standard for storing and exchanging documents over Internet. And because it was designed to be extensible, it can be easily adapted to almost every need. In this post I would like to describe how to … Continue reading
JSF Facelets: templates
Facelets were introduced in JSF 2.0 to resolve common inefficiencies in JSF when creating large-scale sites. Two most useful additions provided by facelets were the ability to reuse the code through templating and to create custom composite components conveniently. In … Continue reading
Create temporary files and directories using Java NIO2
Temporary files and directories are very useful in many situations. One typical case is that you are writing some (usually large) file and you don’t want anybody to accidentally access and mess with it until is completely written and closed. … Continue reading
Using JUnit, JaCoCo and Maven for code coverage
JaCoCo is quite a new tool for measuring and reporting code coverage with full support for Java 7. Currently it supports instruction, branch, line, method and class coverage which is pretty anything you can expect from this kind of tool. … Continue reading
Posted in Code coverage, Java, Maven, Software development practices
Tagged Code coverage, JaCoCo, Java, Jenkins, JUnit, Maven
3 Comments
Monitoring AJAX request lifecycle in JSF
Sometimes when working with AJAX in JSF you may find it useful to able to perform some actions before the request is sent to server, after the response is received and when some error occurs. The common case is to … Continue reading
