Tuesday, September 23, 2014

IOException : tmpFile renameTo classFile failed in JSP.

While coding with JSP I get random meaning less exceptions quite a time. Today when I run the Jsp suddenly ran in to the below exception.

HTTP ERROR: 500  
 tmpFile.renameTo(classFile) failed  
 RequestURI=/Index.jsp  
 Caused by:  

Friday, September 19, 2014

Constructor inheritance(ovveriding) and reasons behind restricting constructor inheritance in Java.

Inheritance is one the key concept of OOP. Being object oriented language, Java supports it. With inheritance every Child becomes a Parent. You can access the properties of Parent from a Child once you inherit Parent (using extends keyword). Here is a key point to note that, though you can access the members of Parent you cannot inherit/ or override constructor in Java.

Constructor overloading and constructor chaining in Java

Whenever people just say constructor is just like a method, I'm really scared about their understanding and I really pity on constructor. The concept of constructor is completely different from a normal method. When we actually want to dig in to the core concepts, one of the key point to learn is about constructor which is used to initialize the class properties (or any other initial business logic after initialization of properties) while object creation.

Tuesday, September 16, 2014

Print preview images and css not loading for first time.

While I'm trying to print one of my web pages in browser, faced a strange issue today. When I click the print button for the first time, the print preview (in chrome browser) looks like weird and no images and styles are appeared in the print preview. Where as if I click again, strangely everything is fine.

Monday, September 15, 2014

Why to use UIBinder in GWT

One of my favorite feature released in GWT 2.4 is Declarative Layout aka UiBinder, a quick way to design the UI. The biggest advantage of using it is to separate the UI declaration from sensitive Java code. When the release team introducing UiBinder, they stated as below

Friday, September 5, 2014

Default access modifier in Java (or) No access modifier in Java

When we do programming, one of the key points to remember is providing access control to the attributes you are writing. Otherwise you cannot make sure, which is going to be change and which attribute you can have control to write the flow of your algorithm.