Struts2 with Tiles 2.1 or 2.2 - struts2

there doesn't seem to be a simple way to use Tiles 2.1 or 2.2 with Struts2 with the existing struts2-tiles plugin. I need to use the tiles wildcards functionality in my project where the tiles.xml became unmaintainable.
Is there any way at all to set up tiles 2.1 or 2.2 with struts2? How?
Thank you,
Bozo

I suggest you to use Sitmesh decoration framework for strut2

As far as I'm aware current struts2 major release ships with tiles 2.0.6. Wildcard support has been added since tiles 2.1 so I'm afraid you can not use wildcards with current version of plugin.
If you want to setup the tiles 2.1+ with struts2 anyway you have to tweak the plugin yourself or wait for the next release.
You also might wanna consider using a preparer in case you want to set some dynamic values to you definition. Hope this helps.
you can check this issue for tiles plugin which is unresolved yet.

Related

Does spring-data-elasticsearch support search_after?

We are using spring-data-elasticsearch version 4.1.3 currently. We need to use ES deep paging and it's search_after feature. Looking at the spring-data-elasticsearch NativeSearchQueryBuilder javadoc, it does not look like ES search_after is supported. I might not look at the right place or there is a way to incorporate search_after into the query builder that I don't know. Any guidance is appreciated.
Currently this is not supported, there is an issue to have this implemented.
Edit 25.09.2022:
Support for the Point In Time API is contained since version 5.0M6 and is either available now from the milestone releases or with the release of version 5 in November 2022.

Grails 3.3, which transactional library to import?

If you create a new service groovy class, and add "#Transactional" at the top, eclipse offers 3 imports:
grails.transaction.Transactional
org.springframework.transaction.annotation.Transactional
grails.gorm.transactions.Transactional
The first one is what gets created in 3.3 when you generate the static controllers, so one might assume this is the official and correct version. however, it is deprecated.
The middle one is used in some online examples.
The last one is used in this document page for grails 2.5, so may or may not still be correct.
Does anyone know which is the correct one?
grails.gorm.transactions.Transactional is GORM 6.1 I think this is Grails 3.2 + (possibly later releases of 3.2)
grails.transaction.Transactional is what i use at the moment and came out in later versions of grails 2
org.springframework.transaction.annotation.Transactional is the eldest of the lot probably not a good idea to use
In regards to the order that is all down to your IDE, meaning if you select one over another it will in the future remember that and show that to you first
With Grails 3.3 and Gorm 6.x onwards, you should use grails.gorm.transactions.Transactional -- this is replacement for the previous transactional annotations, the old annotations will eventually be removed

Will there be any performance improvement if I upgrade the grails version

I have a grails app built on grails 1.3.7.
My app is pretty slow and I'm trying to figure out the hungry blocks in my code.
On the other side I'm thinking whether upgrading to latest grails version will add to the performance of my app. will that do any good for my app?
Will upgrading just the plugins keeping the grails as it is will help?
And if you know any plugins or tweaks I can add to improve its performance, please suggest.
Thank you.
Well in general you need to remember a few things.
Grails app runs over groovy, and groovy returns a java code at the end that runs on the jvm. So it will always be slower than the pure java code.
There is a vast difference between the runtime required for a java code and a groovy code. eg for loop is much efficient than each method of groovy.
Dynamic finders and the meta programming slows down a grails app even more, since all the methods and finders are created at runtime.
Grails vs Java comparision
In order to speed by your app try using #CompileStatic annotation that can speed up your app to a good extent. This will disable your dynamic finders and meta programming. So use it wisely and in classes where you do not require then. You can use it both at method level and class level. BUt to use this you need to upgrade to grails 2.0 version
Other measures you can take is to avoid using groovy functions like each etc and use java counterparts like while, for etc

Grails with ObjectDB

Is it possible to use ObjectDB with Grails?
Or in other words, do I have to use Hibernate when i developing applications with grails?
Yes it is possible.
I think if you do well formed configuration it works nice
yes it is possible.
simply add library to your grails project and use like in java but in my option hibernate in full stack for all simpl

Create Grails documentation - gdoc

When I take a look at the great looking Grails Reference Documentation (http://grails.org/doc/latest/) and compare it with my lousy gdoc documentation, I wonder what makes the difference?
is it just a different style sheet?
or do they use another tool?
How do I get these great looks for my own project without having too much to do?
The easy way to get the new look is to upgrade to 2.0M1 which uses the new look and feel. Peter Ledbrook created the current 1.3.7 docs with the new approach but I'm not sure how easy it'd be to do for a regular Grails application. And there are obviously many reasons to upgrade to 2.0.
You might want to wait a day or so - we're planning on releasing M2 this week. But upgrading from M1 to M2 will be trivial. The real work will be upgrading from 1.3 to 2.0, which isn't that bad.
They use the same exact documentation building tool. It's clearly customized CSS but nothing else. You can read more about it in the reference documentation itself.
Since Grails 1.2, the documentation engine that powers the creation of this documentation is available to your Grails projects.
From the documentation itself.

Resources