Disable Certificate Validation in Java SSL Connections

July 16, 2009
By design when we open an SSL connection in Java (e.g. through“https://….”)) the JSSE implementation of the SSL protocol performs few validations to ensure the requested host is not fake. This involves validation of the server’s X.509 certificate with the PKIX algorithm and checking the host name agains the certificate subject. If the SSL

JAX-RS, @Path, @PathParam and Optional Parameters

July 15, 2009
In a recent Java project I needed to develop and provide to external clients a RESTful Web Services interface to an internal system. After some research I found that using JAX-RS and its open-source implementation Jersey with Spring and Hibernate as back-end will be great technologies stack for this project. Seems easy but unfortunately I

Universal Relative to Physical Path Converter for Windows Forms / ASP.NET / WPF / Console Apps

July 14, 2009
The .NET Framework does not provide standard functionality for resolving a path relative to the application root to a physical file system path. Thus in ASP.NET Web applications we need to use Server.MapPath(), but in console and Windows Forms / WPF applications we need to rely on the current directory. Moreover if we run a

Embedding a Font into Web Application

July 9, 2009
Most people believe that Web applications should use only standard fonts like “Arial” and “Courrier New”. I think so (at least for the moment) but sometimes Web designers use non-standard fonts and you find out about this few months later. What to do? How to make the application behave correctly? Embed the Non-Standard Font into