How to integrate Struts2 with Thymeleaf? - struts2

Does anybody know how to integrate Struts2 with Thymeleaf? I could not find any tutorial regarding integrating Struts2 and Thymeleaf.

I wrote a simple plugin that supports using Thymeleaf templates as the result type for Struts2 actions. The readme file contains examples of how to use the plug-in. You'll need to build the plug-in from source, as its not currently in any Maven repositories.
https://github.com/codework/struts2-thymeleaf-plugin

Related

Whats the right swagger tool/plugin to generate Swagger 2.0 jsons out of JaxRS annoations which works with ANT?

We use Apache Ant for our project build and were thinking of extending the same for getting swagger 2.0 specs .json generated for our REST API docs. I found an ant task : https://github.com/cstroe/swagger-ant-task
which would invoke the same swagger core maven plugin, but some dependency jars have been changed in the github package due to which I am getting 'No Such Method' Exception for getApiInfo() method in ApiSourceInfo.java.
We cannot use maven just for generating API docs. I needed some help in finding a way by which I can use swagger core tool of generating docs using swagger annotations in the API definition file. Using ant wrapper for the maven plugin was one way but I am not not able to leverage it. Is there any other workaround?
Or to frame it otherwise, whats the right swagger tool/plugin to generate Swagger 2.0 jsons out of JaxRS annoations which works with ANT.
Any suggestion would be much appreciated.
Thanks

How to use ActionForm, ActionForward, DispatchAction, ActionMessages in Struts2

I am converting application from struts1 to struts2 so I need to use ActionForm, ActionForward, DispatchAction, ActionMessages.
How I can use that in struts 2?
If you convert an app from struts1 to struts2 then you don't need to use these classes because they belong to struts1, but if you want to use struts2-struts1-plugin then you can use them. Note that using this plugin is is not easy and requires some effort to configure such application. See Struts 1 Plugin.

How to add filters to a Grails app

I'm trying to add these single signout filters to my Grails 2.3.6 app. According to the Grails docs on Filters it seems like you can only add new (custom) filters to Grails apps, whereas these are existing filters imported from another project/JAR.
I scanned my project for the existence of a web.xml and didn't find anything.
How can I add the specific filters in the above link to my Grails app?
The easiest way is to run "grails install-templates" and edit the resulting src/templates/war/web.xml file.
You can use WebXmlConfig plugin which provides a DSL approach to add/modify contents to web.xml.

grails plugin to get gmail attachment

I am working on a grails project and i need a plugin to extract an email attachment from a Gmail account.
My colleague said something about Java Mail API but i am not actually sure about how to integrate the api with grails.
Is there any other plugin or workaround to extract an email attachment from a gmail account?
Thanks.
While not specific to extracting attachments from GMail, the Grails Routing plugin would definitely be worth evaluating. It integrates Apache Camel into your Grails services and controllers and provides a very easy way to create routes. You can then add the following dependency to your grails-app/BuildConfig.groovy file:
// replace x.x.x with version used by the Grails Routing plugin
runtime("org.apache.camel:camel-mail:x.x.x")
In the documentation for the Mail component you will an example of grabbing attachments from GMail and there is also this blog entry by Mr Haki that shows an example using the older Grails Camel plugin (Routing plugin supercedes it).
While I haven't used Camel for this purpose, I have used it on a few projects and would recommend it as a possible solution. It is a very powerful integration tool and can really make it very easy to do some pretty complicated things.

Grails JQGrid 4.0

This problem also concerns my question regarding the multiple grouping inside the JQGrid using the <jqgrid:grid> tag. But as I later found out here in the changelog of JQGrid, there might be issues with the grouping feature of JQGrid version 3.8.0. I've tried using the scripting format of JQGrid presented here
So in theory, I would download JQGrid 4.0 and use it in the concerned project.
The question is how can I use the downloaded JQGrid 4.0 files to my project.
In the case that you can't find a Grails plugin that uses the version of jqGrid that you need, you could go the more direct route of downloading jqGrid.
Just put the js file in the webapps/js folder of your grails project and then include the source on whatever gsp pages you need. You wouldn't get whatever ease of use you get from the Grails plugin, but if you absolutely need the newest version of jqGrid without waiting for a Grails plugin update, then there ya go.

Resources