Nico Huysamen
Nico Huysamen

Reputation: 10417

Grails 2.3.0 view rendering issue

I am having a strange issue with my Grails application. It seems that it's caching the views incorrectly. What is happening, is that the first time I hit a path with a specific action (let's say /controller/index) it will load the correct index view for that controller. Now, when I go to /anotherController/index, the correct controller is called, but it still tried to serve the old index gsp, resulting in obvious *NotFound exceptions.

This happens with all views. The first one that get's loaded gets displayed for all subsequent actions with the same name. I.e. the first show that get's called will be correct, but then any other show for another domain object tries to use the old one.

Any suggestions? My code is pretty much the stock standard generate-all versions at the moment.

I should also say, running in dev mode works 100%. Prod war in tomcat 7.0.42 is giving the issues.

Upvotes: 0

Views: 156

Answers (1)

L_7337
L_7337

Reputation: 2748

I had a weird issue like this a few weeks ago, but it was caching some information from the database and was not returning the correct results.

Here is what I did:

  1. Stopped Tomcat
  2. Deleted all the files in Tomcat's Temp directory
  3. Restarted Tomcat

After that, it worked fine.

Let me know if this helps.

Upvotes: 2

Related Questions