Maven allows to publish project source code and javadoc with complied artifact. Maven source plugin and javadoc can do it easily for you. Here is pom configuration for it. Attaching source Maven source plugin also allows to package test source codes Attaching test source code Attaching javadocs you achieve it by issuing any of following […]

Add caching layer on your web application, with out modifying the code. SimplePageCachingFilter Ehcache has an out-of-box of solution for this ‘SimplePageCachingFilter’. SimplePageCachingFilter is caching filter can be use full for html or any other response type e.g JSON or xml. It uses singleton Ehcache manager to store contents. Cache keys are calculated using the […]

In recent times there is lot of growth in RESTFul services. I thought it would be nice to talk about it. This example is using Apache CXF and Spring. There are some other frameworks e.g Jersey (Reference Sun implementation), RestEasy, the JBoss choice and Apache CXF. Here is bacic web configuration adding Spring context and […]

JSP or EL expression is not evaluated. I have seen couple of times JSP directly displaying the el-expression on webpages. It may be because of couple reasons 1) Typo in your jsp. 2) Attributes are not set in reqeust or pageContext. 3) You have not enabled EL expression in your JSP or not enabled in […]

Spring MVC is part of Springframework. It allow us to create application based on MVC design pattern in way that, we can leverage other features of Spring like authentication, ORM, AOP and others. In Spring MVC core component is the DispatcherServlet{link}, It works as front-controller. All request are processed by DispatcherServlet. It is also responbile […]

HashMap vs Hashtable Hashtable and HashMap are both key-value based data structure. Both of them allows the access data based on key. Both of them some differences in storing values and performance over iteration. Some of the basic differences are following HashMap HashTable Synchronized Un-synchronized  Synchronized Allow null Allowed Null for key and Value Not allowed, Null pointer would […]

Hippo CMS 7 allows you to pick image in cms editor from Image gallery using hippogallerypicker add- on . Hippo Gallery picker can be configureed to display custom height and width of custom image. Confgiuration can done at ‘/hippo:namespaces/hippogallerypicker/imagelink/editor:templates/_default_/root’ by changing properties of preview.width and preview.height.

It is very common to use unique identifiers in web application for identifying unique users or some other usage, till now I was always writing an program using some random generator code for them. It is always hard to do that, as those unique identifiers should not repeat them self in future, else it will […]

People always define Logger in upper case for not having PMD warning According to SUN code convention only constants should be defined in upper case. Every thing that you define as static and final doesn’t not become constant, but it should immutable too. Logger are not immutable like other primitive types e.g number and String,  Logger […]

We posted earlier how send email using java email api. Here is example of sending email in plain text and html format in same email.