No more struts.

I converted photodb from struts to jstl last week.

I did it using search and replace commands in vim, after I had learnt how to use backreferences (I’ve used them in perl for years but never in the replace part of a search and replace before oddly enough).

An example of one of them is:

%s/<struts:equal name=['"]\(\w\+\)['"] property=['"]\(\w\+\)['"] value=['"]\(\w\+\)['"]>/<c:if test='${\1.\2 == \3}'>/gc

I stuck them all in a text file and went through each JSP and copied and pasted them into the command buffer for each tag I found.

Was not too laborious, and now I have learnt about backreferences in vim I will use them a lot more.

I still have to do this site though, then I will be 100% struts free.

My reasons for changing over were simply that JSTL’s Expression Language is far more powerful than using tags.