Creating a New Maven Archetype

A Maven archetype is like a template project. You can create a new project quickly from this template. If you find yourself creating same type of projects over and over again, it may be useful to create an archeype for it.

Continue reading


With Maven, Eclipse and Java EE

When it comes to developing a Java EE app in Eclipse you have two choices. You can use the native project structure of Eclipse or you can use a Maven managed project. If you are using a third party framework like Spring or Struts2, you might find that Maven is the easier of the two options. I found Maven is also a better option when your Java EE project depends on other in-house Java projects. If you are not sure if you should move to Maven, this tutorial will be useful.

There are tons of tutorials on how to create a basic web or Spring MVC project using Maven. There are a few things missing. Very few properly show how to do this from Eclipse and almost none I have seen show how to build a full stack Java EE 6 app with CDI, JPA and other API. Hopefully, this tutorial will fill that gap.

Continue reading

SEO Friendly URL in Struts 2

A SEO friendly URL supplies request parameters as a part of the URI. Such asĀ /edit-game/zombi-2014 rather than /edit-game?gameId=zombi-2014. This is because Google does not index any text that comes after “?”.

By default, Struts 2 has SEO friendly URL disabled. But, this can be enabled rather easily. In this tutorial, I will show you how to do that in an application using the convention plugin and annotation.

Continue reading

Using Struts 2 Convention and Annotation

Previously, I showed how to create a basic Struts 2 application from scratch. It used the struts.xml file to declare action classes and results. An alternative to that approach is afforded by the convention plugin. If you use that plugin, there is no need to declare action classes and results in struts.xml. System finds them based on certain conventions or rules. In addition, you can use annotations to further customize the rules.

Continue reading