History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-2918
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Peter Ledbrook
Reporter: Marc Guillemot
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Grails

TagLib reloading is broken

Created: 08/May/08 10:53 AM   Updated: 02/Jun/08 04:18 AM
Component/s: None
Affects Version/s: 1.0.2
Fix Version/s: 1.0.3

Time Tracking:
Not Specified

File Attachments: 1. Text File patchTestTaglibReloading.txt (54 kb)


Testcase included: yes


 Description  « Hide
Changes in taglib are not visible until the application is restarted. I've seen the problem in 1.0.1 and it still occurs in 1.0.2 and in current latest version from SVN.

An older bug GRAILS-1882 reported it for 1.0-RC2 but was closed as "Cannot Reproduce"

Attached is a simple patch for grails-functional-tests testing reloading of taglibs (which naturally fails currently)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Graeme Rocher - 27/May/08 08:30 AM
When trying to apply your patch it fails, I'm not sure if you did it against latest SVN head but the patch is not valid

As for the problem even now I'm unable to reproduce the issue


Peter Ledbrook - 28/May/08 10:24 AM
The problem is very specific to non-controller views, i.e. if the view is directly in "grails-app/views" or somewhere under "web-app". I don't know why this is the case, but I'll take a look.

Peter Ledbrook - 28/May/08 10:29 AM
Ok, it's because the reload servlet filter skips any URL which has a "." in the last path element, e.g. ".../book/index.gsp". This prevents the tag library from reloading.

Peter Ledbrook - 28/May/08 01:42 PM
My proposed solution is to remove the code in the filter that skips those URLs and instead map the filter to the "grails" and "gsp" servlets. This will allow reloading for all "*.gsp" URLs while excluding the filter from the image, javascript, and css files. I will also try to get the functional test operational - it is currently failing because it runs Grails in the "test" environment and the reloading filter is only active for "dev" at the moment.

Graeme Rocher - 29/May/08 03:56 AM
Just as a note this is also a problem when you're using content negotiation via file extensions. For example going to ".rss" or ".xml" doesn't reload

Maybe we need to be more specific about what we skip


Peter Ledbrook - 29/May/08 04:07 AM
Content negotiation goes through GrailsDispatcherServlet, though, doesn't it? So if we tie the filter to the servlet and remove the hard-coded URL filtering, the reloading should work for content negotiation too.

Peter Ledbrook - 30/May/08 01:03 PM
Fixed in r7069.

Marc Guillemot - 02/Jun/08 04:18 AM
Thanks for fixing it. I would recommend to refactor the webtests to avoid the duplications in testReloading*.