Simple Struts 2 and hibernate integration

A simple example of setting up hibernate to work alongside Struts2.

Read More

Struts 2 form with validation and XHTML CSS layout (part 3)

This is the third and final part of how to create an XHTML layout with CSS styling using Struts2 as the framework.

Read More

Struts 2 form with validation and XHTML CSS layout (part 2)

This follows on from yesterdays post and shows how to ceate a Struts2 form using only CSS and HTML.

Read More

Struts 2 form with validation and XHTML CSS layout (Part 1)

I needed to build a Struts2 form that used XHTML for it layout and I wanted it to be styled using CSS. Struts2 already contains themes that can be used, the XHTML theme is the one I was interested in for this problem.

Read More

Wilcard mappings in Struts 2

You do not need to define every action that you use in Struts2 even if you are not using the zero-configuration option. You can have a default catch all action that will simply map to either an action class or JSP but using wildcard mappings.

Read More

Namespaces in Struts 2

I know they are easy once you understand them but when I was starting using Struts2 (and I had previously used Struts1) I had a bit of difficulty with them for some reason.

Read More

i18n (internalisation) in Struts 2

If you are using Struts2 then it provides features that allow you to easily manage multiple languages on your website. This is how to do it.

Read More

Modify Struts2 to use custom classloaders

If you have loaded some resources using a custom classloader then you will find that Struts2 can't find them as it does not provide the ability to specify custom classloaders to load resources from. I needed this facility and so decided to figure out how to add this functionality to Struts2.

Read More

Programitically loading a struts.xml file

How to programitically load a struts.xml file at runtime after the Struts2 framework has already been initialised.

Read More

Handling an exception using Struts 2

If you were wondering exactly how to handle an exception with Struts 2 then the framework can help you out. It already provides a way to catch all exceptions that your own code does not catch. Here is an example.

Read More

Spring / CAS with unprotected pages.

The problem with Spring Security and CAS is that Spring Security will not query CAS to see if a user is logged in if the user is not requesting a page that is protected by Spring Security. This is my solution to the problem.

Read More