Quantcast

strange resources plugin behavior dependent on container

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

strange resources plugin behavior dependent on container

Kallin Nagelberg
Hey everyone,

I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.

It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:

<head>
    <title>
        <g:layoutTitle default="Sample App"/>
    </title>
    <r:require module="application"/>
    <r:require module="custom-bootstrap"/>
    <r:require module="resourcedImages"/>
    <r:layoutResources/>
</head>


But the generated content differs radically in 3 different environments I've tried:
 
1. dev-mode w/ the included tomcat.
2. running the WAR with a jetty-runner standalone jar.
3. running the WAR with a tomcat-runner standalone jar.

The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.


1. DEVMODE looks like:
<head>
    <title>
        Sample App
    </title>
    
    
    
    <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
<link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
<script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
<script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
<link href="/static/images/favicon.ico" rel="shortcut icon" />
<link href="/static/images/socialvertical.png" rel="shortcut icon" />

</head>


2. with JETTY it looks like:
<head>
    <title>
        Sample App
    </title>
      
  
    
    <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
<link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
<script src="/static/js/application.js" type="text/javascript" ></script>
<script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
<script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
<script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
<script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
<script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
<script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
<script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>

<script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
<script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
<script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
<link href="/static/images/favicon.ico" rel="shortcut icon" />
<link href="/static/images/socialvertical.png" rel="shortcut icon" />
</head>


3. with TOMCAT runner :

<head>
    <title>
        Sample App
    </title>
    <link rel="shortcut icon" href="/images/favicon.ico">
    
    
    
    <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
<link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
<link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
<link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
<script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>

<script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
<script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
<link href="/static/images/favicon.ico" rel="shortcut icon" />
<link href="/static/images/socialvertical.png" rel="shortcut icon" />


</head>



Any ideas or references on why this is happening would be greatly appreciated!

Cheers,
-Kallin Nagelberg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Marc Palmer Local

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>  
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>    
>    
>    
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>      
>  
>    
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>    
>    
>    
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg

On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
Something else interesting I've noticed:

I've come to expect seeing the following show up every time I start grails:

[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

However, with the tomcat webapp-runner those lines don't show up.

On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg <[hidden email]> wrote:
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Marc Palmer Local
Drifting a lot from original topic here...

Sent from my iPad

On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]> wrote:

Something else interesting I've noticed:

I've come to expect seeing the following show up every time I start grails:

[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

However, with the tomcat webapp-runner those lines don't show up.

On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg <[hidden email]> wrote:
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
Is it? I'm trying to help identify the root of the problem, so detailing the differences observed in the different containers seems useful.

FYI I've tried with 1.2-RC1 and things are the same.

On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
Drifting a lot from original topic here...

Sent from my iPad

On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]> wrote:

Something else interesting I've noticed:

I've come to expect seeing the following show up every time I start grails:

[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

However, with the tomcat webapp-runner those lines don't show up.

On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg <[hidden email]> wrote:
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
I've managed to narrow it down by enabling some logging. It looks like the resource plugin is unable to find my less and cs files in the embedded tomcat:

2012-06-26 14:06:22,086 [pool-2-thread-1] WARN  resource.ResourceProcessor  - ServletContext resource [/cs/slick_formatters.coffee] cannot be resolved to absolute file path - web application archive not expanded?
2012-06-26 14:06:22,110 [pool-2-thread-1] WARN  resource.ResourceProcessor  - ServletContext resource [/less/main.less] cannot be resolved to absolute file path - web application archive not expanded?

I'll try to see if I can find a solution and share it if I do.

On Tue, Jun 26, 2012 at 11:28 AM, Kallin Nagelberg <[hidden email]> wrote:
Is it? I'm trying to help identify the root of the problem, so detailing the differences observed in the different containers seems useful.

FYI I've tried with 1.2-RC1 and things are the same.


On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
Drifting a lot from original topic here...

Sent from my iPad

On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]> wrote:

Something else interesting I've noticed:

I've come to expect seeing the following show up every time I start grails:

[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

However, with the tomcat webapp-runner those lines don't show up.

On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg <[hidden email]> wrote:
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email







Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
I've narrowed it down further:

Both the lesscss-resources:1.3.0.3 and coffeescript-resources:0.3.2 plugin's mappers perform the following:

File input = grailsApplication.parentContext.getResource(resource.sourceUrl).file

This doesn't seem to always work. The core resources mappers seem to  just use the resource.processedFile directly, which is working fine in my case.

I'm going to try rewriting those mappers in my project and hopefully they take precedence over what comes in the plugin. I'm open to better suggestions!




On Tue, Jun 26, 2012 at 2:08 PM, Kallin Nagelberg <[hidden email]> wrote:
I've managed to narrow it down by enabling some logging. It looks like the resource plugin is unable to find my less and cs files in the embedded tomcat:

2012-06-26 14:06:22,086 [pool-2-thread-1] WARN  resource.ResourceProcessor  - ServletContext resource [/cs/slick_formatters.coffee] cannot be resolved to absolute file path - web application archive not expanded?
2012-06-26 14:06:22,110 [pool-2-thread-1] WARN  resource.ResourceProcessor  - ServletContext resource [/less/main.less] cannot be resolved to absolute file path - web application archive not expanded?

I'll try to see if I can find a solution and share it if I do.

On Tue, Jun 26, 2012 at 11:28 AM, Kallin Nagelberg <[hidden email]> wrote:
Is it? I'm trying to help identify the root of the problem, so detailing the differences observed in the different containers seems useful.

FYI I've tried with 1.2-RC1 and things are the same.


On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
Drifting a lot from original topic here...

Sent from my iPad

On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]> wrote:

Something else interesting I've noticed:

I've come to expect seeing the following show up every time I start grails:

[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]
[  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2) Resig/20070309 PilotFish/1.2.13  ]

However, with the tomcat webapp-runner those lines don't show up.

On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg <[hidden email]> wrote:
For consistency, let me show the runners in a consistent fashion:

Jetty runner:
download: http://search.maven.org/#browse%7C1647191963  (version: 7.5.4.v20111024)

Tomcat runner
download: http://search.maven.org/#browse%7C-2139724589 (version: 7.0.27.1)

On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg <[hidden email]> wrote:
Thanks Marc, I'll try 1.2-RC1 and see if that helps.

I'm actually building an app to deploy to Heroku, so that's the reason for using these 'runner' webservers.

The jetty runner I'm using is here , and is described here .

The tomcat runner I'm using is here , and I discovered it via here.

Thanks,
-Kallin Nagelberg


On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]> wrote:

On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:

> Hey everyone,
>
> I've encountered something quite confusing with the resources plugin (resources:1.1.6) along with grails 2.0.3.
>
> It looks like the <head> content being generated is different depending on the container. My layout file is something simple like:
>
> <head>
>     <title>
>         <g:layoutTitle default="Sample App"/>
>     </title>
>     <r:require module="application"/>
>     <r:require module="custom-bootstrap"/>
>     <r:require module="resourcedImages"/>
>     <r:layoutResources/>
> </head>
>
>
> But the generated content differs radically in 3 different environments I've tried:
>
> 1. dev-mode w/ the included tomcat.
> 2. running the WAR with a jetty-runner standalone jar.
> 3. running the WAR with a tomcat-runner standalone jar.
>
> The tomcat version actually doesn't work properly, as it's trying to reference less and coffeescript files outside the static path for some reason.
>
>
> 1. DEVMODE looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <script src="/static/cs/candidate_list_create.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
> </head>
>
>
> 2. with JETTY it looks like:
> <head>
>     <title>
>         Sample App
>     </title>
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/static/less/main_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/therest_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <link href="/static/less/sgrid_less.css" type="text/css" media="screen, projection" rel="stylesheet" />
> <script src="/static/js/application.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drag-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/jquery/jquery.event.drop-2.0.min.js" type="text/javascript" ></script>
> <script src="/static/js/slick_remotemodel.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.core.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.grid.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js" type="text/javascript" ></script>
> <script src="/static/js/slickgrid/slick.rowselectionmodel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-tooltip.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-alert.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-button.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-carousel.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-collapse.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-dropdown.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-modal.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-popover.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-scrollspy.js" type="text/javascript" ></script>
>
> <script src="/static/js/bootstrap/bootstrap-tab.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-transition.js" type="text/javascript" ></script>
> <script src="/static/js/bootstrap/bootstrap-typeahead.js" type="text/javascript" ></script>
> <script src="/static/cs/slick_formatters.js" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
> </head>
>
>
> 3. with TOMCAT runner :
>
> <head>
>     <title>
>         Sample App
>     </title>
>     <link rel="shortcut icon" href="/images/favicon.ico">
>
>
>
>     <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script>
> <link href="/less/main.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/therest.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <link href="/less/sgrid.less" type="text/css" media="screen, projection" rel="stylesheet/less" />
> <script src="/static/bundle-bundle_application_head.js" type="text/javascript" ></script>
>
> <script src="/cs/slick_formatters.coffee" type="text/javascript" ></script>
> <script src="/cs/candidate_list_create.coffee" type="text/javascript" ></script>
> <link href="/static/images/favicon.ico" rel="shortcut icon" />
> <link href="/static/images/socialvertical.png" rel="shortcut icon" />
>
>
> </head>
>
>
>
> Any ideas or references on why this is happening would be greatly appreciated!

Hi Kallin,

I'm not sure I have any answers currently, but some thoughts

0) It looks like depending on the target environment, some mappers are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the CoffeeScript mapper

1) Check for any per-environment config differences. Resources settings and modules in your app and your plugin can be configured to behave different per environment, make sure there's nothing there - i.e. this might explain some of the dev vs deploy differences

2) What does "tomcat runner" mean? Do you mean grails run-war? If not, try grails run-war and see what happens

3) This is likely due to servers returning odd MIME types or problems with mime type definitions. Resources uses servletContext.getMimeType(uri) to work out the type of files in some situations, and this may be affecting whether or not they qualify for some of the mappers.

4) Are the results in each container always consistent with that container's results?

5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but it might be worth a try.

Cheers
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

I offer commercial support for Grails plugins from as low as $50/mo.
For details see: http://grailsrocks.com

Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org |  Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email








Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Edvinas Bartkus-2
I will test and maybe resource.processedFile is really the right way
to load the file

Coffeescript-resources maintainer,
Edvinas

On Wed, Jun 27, 2012 at 2:09 AM, Kallin Nagelberg
<[hidden email]> wrote:

> I've narrowed it down further:
>
> Both the lesscss-resources:1.3.0.3 and coffeescript-resources:0.3.2 plugin's
> mappers perform the following:
>
> File input =
> grailsApplication.parentContext.getResource(resource.sourceUrl).file
>
> This doesn't seem to always work. The core resources mappers seem to  just
> use the resource.processedFile directly, which is working fine in my case.
>
> I'm going to try rewriting those mappers in my project and hopefully they
> take precedence over what comes in the plugin. I'm open to better
> suggestions!
>
>
>
>
> On Tue, Jun 26, 2012 at 2:08 PM, Kallin Nagelberg
> <[hidden email]> wrote:
>>
>> I've managed to narrow it down by enabling some logging. It looks like the
>> resource plugin is unable to find my less and cs files in the embedded
>> tomcat:
>>
>> 2012-06-26 14:06:22,086 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/cs/slick_formatters.coffee] cannot be resolved
>> to absolute file path - web application archive not expanded?
>> 2012-06-26 14:06:22,110 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/less/main.less] cannot be resolved to absolute
>> file path - web application archive not expanded?
>>
>> I'll try to see if I can find a solution and share it if I do.
>>
>> On Tue, Jun 26, 2012 at 11:28 AM, Kallin Nagelberg
>> <[hidden email]> wrote:
>>>
>>> Is it? I'm trying to help identify the root of the problem, so detailing
>>> the differences observed in the different containers seems useful.
>>>
>>> FYI I've tried with 1.2-RC1 and things are the same.
>>>
>>>
>>> On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
>>>>
>>>> Drifting a lot from original topic here...
>>>>
>>>> Sent from my iPad
>>>>
>>>> On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]>
>>>> wrote:
>>>>
>>>> Something else interesting I've noticed:
>>>>
>>>> I've come to expect seeing the following show up every time I start
>>>> grails:
>>>>
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>>
>>>> However, with the tomcat webapp-runner those lines don't show up.
>>>>
>>>> On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg
>>>> <[hidden email]> wrote:
>>>>>
>>>>> For consistency, let me show the runners in a consistent fashion:
>>>>>
>>>>> Jetty runner:
>>>>> download: http://search.maven.org/#browse%7C1647191963  (version:
>>>>> 7.5.4.v20111024)
>>>>> describe: https://devcenter.heroku.com/articles/grails
>>>>>
>>>>> Tomcat runner
>>>>> download: http://search.maven.org/#browse%7C-2139724589 (version:
>>>>> 7.0.27.1)
>>>>> describe:
>>>>> http://www.jamesward.com/2012/02/15/webapp-runner-apache-tomcat-as-a-dependency
>>>>>
>>>>> On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg
>>>>> <[hidden email]> wrote:
>>>>>>
>>>>>> Thanks Marc, I'll try 1.2-RC1 and see if that helps.
>>>>>>
>>>>>> I'm actually building an app to deploy to Heroku, so that's the reason
>>>>>> for using these 'runner' webservers.
>>>>>>
>>>>>> The jetty runner I'm using is here , and is described here .
>>>>>>
>>>>>> The tomcat runner I'm using is here , and I discovered it via here.
>>>>>>
>>>>>> Thanks,
>>>>>> -Kallin Nagelberg
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:
>>>>>>>
>>>>>>> > Hey everyone,
>>>>>>> >
>>>>>>> > I've encountered something quite confusing with the resources
>>>>>>> > plugin (resources:1.1.6) along with grails 2.0.3.
>>>>>>> >
>>>>>>> > It looks like the <head> content being generated is different
>>>>>>> > depending on the container. My layout file is something simple like:
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         <g:layoutTitle default="Sample App"/>
>>>>>>> >     </title>
>>>>>>> >     <r:require module="application"/>
>>>>>>> >     <r:require module="custom-bootstrap"/>
>>>>>>> >     <r:require module="resourcedImages"/>
>>>>>>> >     <r:layoutResources/>
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > But the generated content differs radically in 3 different
>>>>>>> > environments I've tried:
>>>>>>> >
>>>>>>> > 1. dev-mode w/ the included tomcat.
>>>>>>> > 2. running the WAR with a jetty-runner standalone jar.
>>>>>>> > 3. running the WAR with a tomcat-runner standalone jar.
>>>>>>> >
>>>>>>> > The tomcat version actually doesn't work properly, as it's trying
>>>>>>> > to reference less and coffeescript files outside the static path for some
>>>>>>> > reason.
>>>>>>> >
>>>>>>> >
>>>>>>> > 1. DEVMODE looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/cs/candidate_list_create.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 2. with JETTY it looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/js/application.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drag-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drop-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slick_remotemodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.core.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.grid.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.rowselectionmodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tooltip.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-alert.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-button.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-carousel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-collapse.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-dropdown.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-modal.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-popover.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-scrollspy.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tab.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-transition.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-typeahead.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 3. with TOMCAT runner :
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >     <link rel="shortcut icon" href="/images/favicon.ico">
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/less/main.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/therest.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/sgrid.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/cs/slick_formatters.coffee" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/cs/candidate_list_create.coffee"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > Any ideas or references on why this is happening would be greatly
>>>>>>> > appreciated!
>>>>>>>
>>>>>>> Hi Kallin,
>>>>>>>
>>>>>>> I'm not sure I have any answers currently, but some thoughts
>>>>>>>
>>>>>>> 0) It looks like depending on the target environment, some mappers
>>>>>>> are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS
>>>>>>> applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the
>>>>>>> CoffeeScript mapper
>>>>>>>
>>>>>>> 1) Check for any per-environment config differences. Resources
>>>>>>> settings and modules in your app and your plugin can be configured to behave
>>>>>>> different per environment, make sure there's nothing there - i.e. this might
>>>>>>> explain some of the dev vs deploy differences
>>>>>>>
>>>>>>> 2) What does "tomcat runner" mean? Do you mean grails run-war? If
>>>>>>> not, try grails run-war and see what happens
>>>>>>>
>>>>>>> 3) This is likely due to servers returning odd MIME types or problems
>>>>>>> with mime type definitions. Resources uses servletContext.getMimeType(uri)
>>>>>>> to work out the type of files in some situations, and this may be affecting
>>>>>>> whether or not they qualify for some of the mappers.
>>>>>>>
>>>>>>> 4) Are the results in each container always consistent with that
>>>>>>> container's results?
>>>>>>>
>>>>>>> 5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but
>>>>>>> it might be worth a try.
>>>>>>>
>>>>>>> Cheers
>>>>>>> ~ ~ ~
>>>>>>> Marc Palmer
>>>>>>> Freelancer (Grails/Groovy/Java/UX)
>>>>>>>
>>>>>>> I offer commercial support for Grails plugins from as low as $50/mo.
>>>>>>> For details see: http://grailsrocks.com
>>>>>>>
>>>>>>> Blog: http://www.anyware.co.uk | Resumé:
>>>>>>> http://www.anyware.co.uk/marc
>>>>>>> Contributor @ http://grails.org |  Founder @ http://noticelocal.com
>>>>>>> Developer @ http://weceem.org | Member @ http://spottymushroom.com
>>>>>>> Twitter: http://twitter.com/wangjammer5
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Kallin Nagelberg
Awesome, thanks Edvinas. I'm curious to hear how it turns out, as right now we're doing something kind of hacky to work around it.

Cheers,
-Kal

On Wed, Jul 4, 2012 at 6:18 AM, Edvinas Bartkus <[hidden email]> wrote:
I will test and maybe resource.processedFile is really the right way
to load the file

Coffeescript-resources maintainer,
Edvinas

On Wed, Jun 27, 2012 at 2:09 AM, Kallin Nagelberg
<[hidden email]> wrote:
> I've narrowed it down further:
>
> Both the lesscss-resources:1.3.0.3 and coffeescript-resources:0.3.2 plugin's
> mappers perform the following:
>
> File input =
> grailsApplication.parentContext.getResource(resource.sourceUrl).file
>
> This doesn't seem to always work. The core resources mappers seem to  just
> use the resource.processedFile directly, which is working fine in my case.
>
> I'm going to try rewriting those mappers in my project and hopefully they
> take precedence over what comes in the plugin. I'm open to better
> suggestions!
>
>
>
>
> On Tue, Jun 26, 2012 at 2:08 PM, Kallin Nagelberg
> <[hidden email]> wrote:
>>
>> I've managed to narrow it down by enabling some logging. It looks like the
>> resource plugin is unable to find my less and cs files in the embedded
>> tomcat:
>>
>> 2012-06-26 14:06:22,086 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/cs/slick_formatters.coffee] cannot be resolved
>> to absolute file path - web application archive not expanded?
>> 2012-06-26 14:06:22,110 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/less/main.less] cannot be resolved to absolute
>> file path - web application archive not expanded?
>>
>> I'll try to see if I can find a solution and share it if I do.
>>
>> On Tue, Jun 26, 2012 at 11:28 AM, Kallin Nagelberg
>> <[hidden email]> wrote:
>>>
>>> Is it? I'm trying to help identify the root of the problem, so detailing
>>> the differences observed in the different containers seems useful.
>>>
>>> FYI I've tried with 1.2-RC1 and things are the same.
>>>
>>>
>>> On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
>>>>
>>>> Drifting a lot from original topic here...
>>>>
>>>> Sent from my iPad
>>>>
>>>> On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]>
>>>> wrote:
>>>>
>>>> Something else interesting I've noticed:
>>>>
>>>> I've come to expect seeing the following show up every time I start
>>>> grails:
>>>>
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>>
>>>> However, with the tomcat webapp-runner those lines don't show up.
>>>>
>>>> On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg
>>>> <[hidden email]> wrote:
>>>>>
>>>>> For consistency, let me show the runners in a consistent fashion:
>>>>>
>>>>> Jetty runner:
>>>>> download: http://search.maven.org/#browse%7C1647191963  (version:
>>>>> 7.5.4.v20111024)
>>>>> describe: https://devcenter.heroku.com/articles/grails
>>>>>
>>>>> Tomcat runner
>>>>> download: http://search.maven.org/#browse%7C-2139724589 (version:
>>>>> 7.0.27.1)
>>>>> describe:
>>>>> http://www.jamesward.com/2012/02/15/webapp-runner-apache-tomcat-as-a-dependency
>>>>>
>>>>> On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg
>>>>> <[hidden email]> wrote:
>>>>>>
>>>>>> Thanks Marc, I'll try 1.2-RC1 and see if that helps.
>>>>>>
>>>>>> I'm actually building an app to deploy to Heroku, so that's the reason
>>>>>> for using these 'runner' webservers.
>>>>>>
>>>>>> The jetty runner I'm using is here , and is described here .
>>>>>>
>>>>>> The tomcat runner I'm using is here , and I discovered it via here.
>>>>>>
>>>>>> Thanks,
>>>>>> -Kallin Nagelberg
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:
>>>>>>>
>>>>>>> > Hey everyone,
>>>>>>> >
>>>>>>> > I've encountered something quite confusing with the resources
>>>>>>> > plugin (resources:1.1.6) along with grails 2.0.3.
>>>>>>> >
>>>>>>> > It looks like the <head> content being generated is different
>>>>>>> > depending on the container. My layout file is something simple like:
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         <g:layoutTitle default="Sample App"/>
>>>>>>> >     </title>
>>>>>>> >     <r:require module="application"/>
>>>>>>> >     <r:require module="custom-bootstrap"/>
>>>>>>> >     <r:require module="resourcedImages"/>
>>>>>>> >     <r:layoutResources/>
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > But the generated content differs radically in 3 different
>>>>>>> > environments I've tried:
>>>>>>> >
>>>>>>> > 1. dev-mode w/ the included tomcat.
>>>>>>> > 2. running the WAR with a jetty-runner standalone jar.
>>>>>>> > 3. running the WAR with a tomcat-runner standalone jar.
>>>>>>> >
>>>>>>> > The tomcat version actually doesn't work properly, as it's trying
>>>>>>> > to reference less and coffeescript files outside the static path for some
>>>>>>> > reason.
>>>>>>> >
>>>>>>> >
>>>>>>> > 1. DEVMODE looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/cs/candidate_list_create.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 2. with JETTY it looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/js/application.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drag-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drop-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slick_remotemodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.core.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.grid.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.rowselectionmodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tooltip.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-alert.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-button.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-carousel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-collapse.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-dropdown.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-modal.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-popover.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-scrollspy.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tab.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-transition.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-typeahead.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 3. with TOMCAT runner :
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >     <link rel="shortcut icon" href="/images/favicon.ico">
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/less/main.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/therest.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/sgrid.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/cs/slick_formatters.coffee" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/cs/candidate_list_create.coffee"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > Any ideas or references on why this is happening would be greatly
>>>>>>> > appreciated!
>>>>>>>
>>>>>>> Hi Kallin,
>>>>>>>
>>>>>>> I'm not sure I have any answers currently, but some thoughts
>>>>>>>
>>>>>>> 0) It looks like depending on the target environment, some mappers
>>>>>>> are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS
>>>>>>> applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the
>>>>>>> CoffeeScript mapper
>>>>>>>
>>>>>>> 1) Check for any per-environment config differences. Resources
>>>>>>> settings and modules in your app and your plugin can be configured to behave
>>>>>>> different per environment, make sure there's nothing there - i.e. this might
>>>>>>> explain some of the dev vs deploy differences
>>>>>>>
>>>>>>> 2) What does "tomcat runner" mean? Do you mean grails run-war? If
>>>>>>> not, try grails run-war and see what happens
>>>>>>>
>>>>>>> 3) This is likely due to servers returning odd MIME types or problems
>>>>>>> with mime type definitions. Resources uses servletContext.getMimeType(uri)
>>>>>>> to work out the type of files in some situations, and this may be affecting
>>>>>>> whether or not they qualify for some of the mappers.
>>>>>>>
>>>>>>> 4) Are the results in each container always consistent with that
>>>>>>> container's results?
>>>>>>>
>>>>>>> 5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but
>>>>>>> it might be worth a try.
>>>>>>>
>>>>>>> Cheers
>>>>>>> ~ ~ ~
>>>>>>> Marc Palmer
>>>>>>> Freelancer (Grails/Groovy/Java/UX)
>>>>>>>
>>>>>>> I offer commercial support for Grails plugins from as low as $50/mo.
>>>>>>> For details see: http://grailsrocks.com
>>>>>>>
>>>>>>> Blog: http://www.anyware.co.uk | Resumé:
>>>>>>> http://www.anyware.co.uk/marc
>>>>>>> Contributor @ http://grails.org |  Founder @ http://noticelocal.com
>>>>>>> Developer @ http://weceem.org | Member @ http://spottymushroom.com
>>>>>>> Twitter: http://twitter.com/wangjammer5
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Julien ROTT
Hi,

I'm deploying a grails app on heroku. The default container is Jetty, and the resources plugin seems not to be working with it. Is it possible to change the container on heroku to be tomcat ? Or is there a way to make the resources plugin work with Jetty ?

Thanks.

2012/7/5 Kallin Nagelberg <[hidden email]>
Awesome, thanks Edvinas. I'm curious to hear how it turns out, as right now we're doing something kind of hacky to work around it.

Cheers,
-Kal


On Wed, Jul 4, 2012 at 6:18 AM, Edvinas Bartkus <[hidden email]> wrote:
I will test and maybe resource.processedFile is really the right way
to load the file

Coffeescript-resources maintainer,
Edvinas

On Wed, Jun 27, 2012 at 2:09 AM, Kallin Nagelberg
<[hidden email]> wrote:
> I've narrowed it down further:
>
> Both the lesscss-resources:1.3.0.3 and coffeescript-resources:0.3.2 plugin's
> mappers perform the following:
>
> File input =
> grailsApplication.parentContext.getResource(resource.sourceUrl).file
>
> This doesn't seem to always work. The core resources mappers seem to  just
> use the resource.processedFile directly, which is working fine in my case.
>
> I'm going to try rewriting those mappers in my project and hopefully they
> take precedence over what comes in the plugin. I'm open to better
> suggestions!
>
>
>
>
> On Tue, Jun 26, 2012 at 2:08 PM, Kallin Nagelberg
> <[hidden email]> wrote:
>>
>> I've managed to narrow it down by enabling some logging. It looks like the
>> resource plugin is unable to find my less and cs files in the embedded
>> tomcat:
>>
>> 2012-06-26 14:06:22,086 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/cs/slick_formatters.coffee] cannot be resolved
>> to absolute file path - web application archive not expanded?
>> 2012-06-26 14:06:22,110 [pool-2-thread-1] WARN  resource.ResourceProcessor
>> - ServletContext resource [/less/main.less] cannot be resolved to absolute
>> file path - web application archive not expanded?
>>
>> I'll try to see if I can find a solution and share it if I do.
>>
>> On Tue, Jun 26, 2012 at 11:28 AM, Kallin Nagelberg
>> <[hidden email]> wrote:
>>>
>>> Is it? I'm trying to help identify the root of the problem, so detailing
>>> the differences observed in the different containers seems useful.
>>>
>>> FYI I've tried with 1.2-RC1 and things are the same.
>>>
>>>
>>> On Tue, Jun 26, 2012 at 11:15 AM, Marc Palmer <[hidden email]> wrote:
>>>>
>>>> Drifting a lot from original topic here...
>>>>
>>>> Sent from my iPad
>>>>
>>>> On 26 Jun 2012, at 19:08, Kallin Nagelberg <[hidden email]>
>>>> wrote:
>>>>
>>>> Something else interesting I've noticed:
>>>>
>>>> I've come to expect seeing the following show up every time I start
>>>> grails:
>>>>
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>> [  Envjs/1.6 (Rhino; U; Mac OS X x86_64 10.7.3; en-US; rv:1.7.0.rc2)
>>>> Resig/20070309 PilotFish/1.2.13  ]
>>>>
>>>> However, with the tomcat webapp-runner those lines don't show up.
>>>>
>>>> On Tue, Jun 26, 2012 at 10:36 AM, Kallin Nagelberg
>>>> <[hidden email]> wrote:
>>>>>
>>>>> For consistency, let me show the runners in a consistent fashion:
>>>>>
>>>>> Jetty runner:
>>>>> download: http://search.maven.org/#browse%7C1647191963  (version:
>>>>> 7.5.4.v20111024)
>>>>> describe: https://devcenter.heroku.com/articles/grails
>>>>>
>>>>> Tomcat runner
>>>>> download: http://search.maven.org/#browse%7C-2139724589 (version:
>>>>> 7.0.27.1)
>>>>> describe:
>>>>> http://www.jamesward.com/2012/02/15/webapp-runner-apache-tomcat-as-a-dependency
>>>>>
>>>>> On Tue, Jun 26, 2012 at 9:34 AM, Kallin Nagelberg
>>>>> <[hidden email]> wrote:
>>>>>>
>>>>>> Thanks Marc, I'll try 1.2-RC1 and see if that helps.
>>>>>>
>>>>>> I'm actually building an app to deploy to Heroku, so that's the reason
>>>>>> for using these 'runner' webservers.
>>>>>>
>>>>>> The jetty runner I'm using is here , and is described here .
>>>>>>
>>>>>> The tomcat runner I'm using is here , and I discovered it via here.
>>>>>>
>>>>>> Thanks,
>>>>>> -Kallin Nagelberg
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 26, 2012 at 1:52 AM, Marc Palmer <[hidden email]>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> On 25 Jun 2012, at 23:43, Kallin Nagelberg wrote:
>>>>>>>
>>>>>>> > Hey everyone,
>>>>>>> >
>>>>>>> > I've encountered something quite confusing with the resources
>>>>>>> > plugin (resources:1.1.6) along with grails 2.0.3.
>>>>>>> >
>>>>>>> > It looks like the <head> content being generated is different
>>>>>>> > depending on the container. My layout file is something simple like:
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         <g:layoutTitle default="Sample App"/>
>>>>>>> >     </title>
>>>>>>> >     <r:require module="application"/>
>>>>>>> >     <r:require module="custom-bootstrap"/>
>>>>>>> >     <r:require module="resourcedImages"/>
>>>>>>> >     <r:layoutResources/>
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > But the generated content differs radically in 3 different
>>>>>>> > environments I've tried:
>>>>>>> >
>>>>>>> > 1. dev-mode w/ the included tomcat.
>>>>>>> > 2. running the WAR with a jetty-runner standalone jar.
>>>>>>> > 3. running the WAR with a tomcat-runner standalone jar.
>>>>>>> >
>>>>>>> > The tomcat version actually doesn't work properly, as it's trying
>>>>>>> > to reference less and coffeescript files outside the static path for some
>>>>>>> > reason.
>>>>>>> >
>>>>>>> >
>>>>>>> > 1. DEVMODE looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/cs/candidate_list_create.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 2. with JETTY it looks like:
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/less/main_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/therest_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <link href="/static/less/sgrid_less.css" type="text/css"
>>>>>>> > media="screen, projection" rel="stylesheet" />
>>>>>>> > <script src="/static/js/application.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drag-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/jquery/jquery.event.drop-2.0.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slick_remotemodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.core.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.grid.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.checkboxselectcolumn.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/slickgrid/slick.rowselectionmodel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tooltip.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-alert.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-button.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-carousel.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-collapse.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-dropdown.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-modal.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-popover.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-scrollspy.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-tab.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-transition.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/js/bootstrap/bootstrap-typeahead.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <script src="/static/cs/slick_formatters.js" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> > 3. with TOMCAT runner :
>>>>>>> >
>>>>>>> > <head>
>>>>>>> >     <title>
>>>>>>> >         Sample App
>>>>>>> >     </title>
>>>>>>> >     <link rel="shortcut icon" href="/images/favicon.ico">
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> >     <script
>>>>>>> > src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/less/main.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/therest.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <link href="/less/sgrid.less" type="text/css" media="screen,
>>>>>>> > projection" rel="stylesheet/less" />
>>>>>>> > <script src="/static/bundle-bundle_application_head.js"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> >
>>>>>>> > <script src="/cs/slick_formatters.coffee" type="text/javascript"
>>>>>>> > ></script>
>>>>>>> > <script src="/cs/candidate_list_create.coffee"
>>>>>>> > type="text/javascript" ></script>
>>>>>>> > <link href="/static/images/favicon.ico" rel="shortcut icon" />
>>>>>>> > <link href="/static/images/socialvertical.png" rel="shortcut icon"
>>>>>>> > />
>>>>>>> >
>>>>>>> >
>>>>>>> > </head>
>>>>>>> >
>>>>>>> >
>>>>>>> >
>>>>>>> > Any ideas or references on why this is happening would be greatly
>>>>>>> > appreciated!
>>>>>>>
>>>>>>> Hi Kallin,
>>>>>>>
>>>>>>> I'm not sure I have any answers currently, but some thoughts
>>>>>>>
>>>>>>> 0) It looks like depending on the target environment, some mappers
>>>>>>> are not being applied. i.e. Jetty is not applying the Bundle mapper, but IS
>>>>>>> applying CoffeeScript, and Tomcat is applying Bundle mapper but NOT the
>>>>>>> CoffeeScript mapper
>>>>>>>
>>>>>>> 1) Check for any per-environment config differences. Resources
>>>>>>> settings and modules in your app and your plugin can be configured to behave
>>>>>>> different per environment, make sure there's nothing there - i.e. this might
>>>>>>> explain some of the dev vs deploy differences
>>>>>>>
>>>>>>> 2) What does "tomcat runner" mean? Do you mean grails run-war? If
>>>>>>> not, try grails run-war and see what happens
>>>>>>>
>>>>>>> 3) This is likely due to servers returning odd MIME types or problems
>>>>>>> with mime type definitions. Resources uses servletContext.getMimeType(uri)
>>>>>>> to work out the type of files in some situations, and this may be affecting
>>>>>>> whether or not they qualify for some of the mappers.
>>>>>>>
>>>>>>> 4) Are the results in each container always consistent with that
>>>>>>> container's results?
>>>>>>>
>>>>>>> 5) Try Resources 1.2-RC1 and see if it is different. I doubt it, but
>>>>>>> it might be worth a try.
>>>>>>>
>>>>>>> Cheers
>>>>>>> ~ ~ ~
>>>>>>> Marc Palmer
>>>>>>> Freelancer (Grails/Groovy/Java/UX)
>>>>>>>
>>>>>>> I offer commercial support for Grails plugins from as low as $50/mo.
>>>>>>> For details see: http://grailsrocks.com
>>>>>>>
>>>>>>> Blog: http://www.anyware.co.uk | Resumé:
>>>>>>> http://www.anyware.co.uk/marc
>>>>>>> Contributor @ http://grails.org |  Founder @ http://noticelocal.com
>>>>>>> Developer @ http://weceem.org | Member @ http://spottymushroom.com
>>>>>>> Twitter: http://twitter.com/wangjammer5
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe from this list, please visit:
>>>>>>>
>>>>>>>    http://xircles.codehaus.org/manage_email
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Marc Palmer Local

On 11 Oct 2012, at 18:55, Julien ROTT <[hidden email]> wrote:

> Hi,
>
> I'm deploying a grails app on heroku. The default container is Jetty, and the resources plugin seems not to be working with it. Is it possible to change the container on heroku to be tomcat ? Or is there a way to make the resources plugin work with Jetty ?
>

For some reason the bundled resource mapper is not running / working correctly under Jetty.

This is odd, as it does not seem to do anything container specific.

The only things I can think of is:

1) Maybe there is an issue with the writeability/creating new files as performed by the bundler - check grails.resources.work.dir is set to a fully writable location outside of your app work dir and see if that helps

2) The only other thing we do is ask the servlet context to load the resources, so that we can copy them.

Marc


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5 


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: strange resources plugin behavior dependent on container

Julien ROTT
Thanks for your answer Marc.

I tried to modify the work dir in heroku, but without success.
I noticed there was a pull request on github to correct the js files bundling, so I switched to version 1.2.RC2 of the plugin. I was using 1.1.5 before. It seems to work.

Thanks for your job.

Julien.

2012/10/11 Marc Palmer <[hidden email]>

On 11 Oct 2012, at 18:55, Julien ROTT <[hidden email]> wrote:

> Hi,
>
> I'm deploying a grails app on heroku. The default container is Jetty, and the resources plugin seems not to be working with it. Is it possible to change the container on heroku to be tomcat ? Or is there a way to make the resources plugin work with Jetty ?
>

For some reason the bundled resource mapper is not running / working correctly under Jetty.

This is odd, as it does not seem to do anything container specific.

The only things I can think of is:

1) Maybe there is an issue with the writeability/creating new files as performed by the bundler - check grails.resources.work.dir is set to a fully writable location outside of your app work dir and see if that helps

2) The only other thing we do is ask the servlet context to load the resources, so that we can copy them.

Marc


~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)

Grails Plugins: http://grailsrocks.com
Blog: http://www.anyware.co.uk | Resumé: http://www.anyware.co.uk/marc
Contributor @ http://grails.org | Founder @ http://noticelocal.com
Developer @ http://weceem.org | Member @ http://spottymushroom.com
Twitter: http://twitter.com/wangjammer5


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...