ThymeLeaf or other alternative UI than JSP in Legacy UI?

Hello UI experts :slight_smile:

is it possible to use another viewing technology than jsp like for ex. in a module, but still use the module together with the openmrs legay ui? I guess using custom openmrs tags (which are jsp tags) would then not be possible.

We have a few jsp pages in and I would really like to replace them. Jsp is such a pain :head_bandage:

1 Like

I have just glanced at the link you gave. But generally i think it should be possible to have it in a module.

I believe you could try out Groovy Server Pages(.gsp). It’s not used in legacyUI (naturally) but we do use them in the UI Frameworks module. @darius would probably answer your question the best :slight_smile:

Btw, It’s really really easy to work with GSPs in comparison to JSPs.

thanks for your answers. I havent used thymeleaf yet, but what I like about their approach is to not use tags, just attributes. for me this reads nicer. I guess I would have to tell springs view resolver about thymeleaf but am not sure if I can still use custom openmrs tags.

JSP with JSTL and a powerful set of custom tags (which we don’t have) is really easy to work with.

Haven’t looked at the specific link, but broadly the difficulty level depends on what versions of the OpenMRS platform you will support.

To build the UI framework module I needed to modify web.xml in OpenMRS core so our OpenMRS servlet would map some additional file extensions in the URL. You wouldn’t need to do exactly that, but most UI frameworks require some servlet mapping or servlet filter, and these are not so easy to do in older OpenMRS platform versions.

Newer versions (I forget which) support dynamically registering true servlets (and not just our more limited module servlets).

Of course if you wanted to use the OpenMRS UI framework you could.