Top 10 Java Developer Forums

java_forumsDevelopers get into tricky situations while programming. Some syntax problem or any specific feature about Java, there are lots of confusions and doubts which we encounter. Best way is to ask community alike. This time, we have collected best Java communities and forums where you can post your doubts and errors, find resources, ask questions and get them answered by other java developers. These resources are authenticated and popular among Java developers. Have a look at these top Java forums.

(more…)

Ideal Way Of Exception Handling In Multi Layer Java Web Application

Exception handling in web application is indeed a tricky task and it varies according to scenarios. There are no fix rules but yes I will give you a generic idea about better way of exception handling. Generally well structured application has four layers: Presentation Layer (JSP/HTML), Business Logic Layer (POJO containing business logic) and Database Access Layer (POJO to interact with Databse) and Data Layer(Database itself). First I will enlist all possible exception handling strategies and then describe suitable strategy for each layer. (more…)

Spring MVC Application Flow With Diagram

I will explain ‘Flow of typical Spring MVC application’ or in other words ‘How exactly user gets served?’. We will see how data and control flows through all the stages of this process. Let me start with one diagram,

Spring2 (more…)

IOC (Inversion of control) Basics With Example

IOC, one of the most buzzing words in IT. I will describe its clear cut meaning with example in this article.

Formal Definition: IOC is an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to traditional programming.

Before discussing further, let me give you one example,

(more…)

Spring UrlFilenameViewController Example

Hope you guys have enjoyed previous article, MultiActionController Example. Now, let’s move on to UrlFilenameViewController. It transforms the virtual path of a URL into a view name and returns the view, that’s it. It is useful when you don’t need any logical operation on request and simply wants to redirect to some resource. For example, each site has ‘Contact Us’, ‘About Us’ pages. To map those pages UrlFilenameViewController is a good choice. Let’s see the example.

(more…)

Spring MultiActionController Example

MultiActionController is one of the types of Controllers in Spring. It extends AbstractController. (Somewhat similar to DispatchAction in Struts)  Why MultiActionController?: It aggregates multiple request handling methods into single controller, so related functionality can be kept together easily.
NOTE:To reduce complexity, I have added business logic in Controller. Later on I will republish this example as per MVC2 standards. Let’s go through the flow of application.

(more…)