Pergunta

I forgot to close a <g:link> tag in one of my GSP files.

The application runs perfectly with grails run-app, but when I try to execute grails war, it says the tag is not closed.

What happens when building the WAR file that is different than when running the app?

Edit:

Due to lukelazarovic's answer, I looked a bit more in detail and found that the unclosed tag came form the layout GSP in a plugin that my app uses. The run-app command seems to be compiling only my GSP files and not the plugins'. So the compilation errors in layout GSPs come to light when you execute grails war.

Foi útil?

Solução

When you run the app using grails run-app, GSPs are compiled on the fly when you access it.

So you would see the error if GSP with unclosed tag is accessed.

In case of grails war, all GSPs have to be compiled and put into resulting war file, therefore any error that prevents any GSP to be compiled is revealed.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top