java

java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String

It happened with me while i was trying to extract a HTTPRequest parameter from an ActionInvocation object. I was writing an interceptor in Struts2 and was trying to check a request parameter. This is how you do it when you are in an interceptor: public String intercept(ActionInvocation invocation) throws Exception { Map<String,Object> params = invocation.getInvocationContext().getParameters(); [...]


Working with Maven Project in Eclipse

Maven helps the software project life cycle in many ways. One of the many attributes if it is that it integrates well with IDEs such as eclipse, Net beans and IntelliJ. I am trying to list certain things here which you can do while working with Maven managed project in Eclipse. 1. You definitely need [...]


Maven 2 – An overview

Maven 2 features View more presentations from Angel Ruiz. Maven 2 in the real world View more presentations from carlo.bonamico.


Apache Commons

An overview of many commons libraries. Will try to cover the popular ones in separate posts. Apache Commons – Don\'t re-invent the wheel View more presentations from tcurdt.


Why re-invent the wheel? Apache Commons – Lang

While coding what we do most? I think checking the Object variable if it is not null before using it. There are various things which we do usually in our code like iterating an Array for deleting the item, Escaping Strings for a particular use, Adding days to the current date, Adding an item in [...]