Re: ChecksumPath exception on unexistent assets

2022-05-10 Thread Roberto
sumPath exception on unexistent assets Hi Bob, thanks for the patch! I've changed it to an early return to don't check for -1 again, and added some tests. https://github.com/apache/tapestry-5/commit/b01906961a456656404fc2bc9d85ea2aeff10c53 Cheers, Ben On Mon, May 9, 2022 at 3:57

Re: ChecksumPath exception on unexistent assets

2022-05-09 Thread Ben Weidig
e. > > The patch is in attached. > > Regards, > Bob > > Roberto Marotta > D.B.M. Srl > Via Enrico Noe, 23 > 20133 Milano > Tel. 02.26.60.05.21 > > > -- > *From: *"Ben Weidig" > *To: *"Tapestry users" > *Sent:

Re: ChecksumPath exception on unexistent assets

2022-05-09 Thread Roberto
patch is in attached. Regards, Bob Roberto Marotta D.B.M. Srl Via Enrico Noe, 23 20133 Milano Tel. 02.26.60.05.21 - Original Message - From: "Ben Weidig" To: "Tapestry users" Sent: Monday, 28 March, 2022 4:30:28 PM Subject: Re: ChecksumPath exception on

Re: ChecksumPath exception on unexistent assets

2022-03-28 Thread Ben Weidig
Hi Bob, thanks for informing us about the exception on non-existant resources, I've created an issue: https://issues.apache.org/jira/browse/TAP5-2713 and will take a look. Cheers, Ben On Mon, Mar 28, 2022 at 4:15 PM Roberto wrote: > > > Hi, > > It appears that the > "org.apache.tapestry5.inte

ChecksumPath exception on unexistent assets

2022-03-28 Thread Roberto
Hi, It appears that the "org.apache.tapestry5.internal.services.assets.ChecksumPath" class throws exception like "String index out of range: -1" when trying to apply substring function on unexistent resource path. Maybe throwing an exception like "404 code error and resource not found" wou

Re: Tapestry exposes the list of css/js files in assets

2020-02-21 Thread Thiago H. de Paula Figueiredo
On Thu, Jan 16, 2020 at 6:22 AM Nicolas Bouillon wrote: > Hi all, > Hello! Thanks for posting your findings. It should be noted that Tapestry considers anything under /WEB-INF/assets are public files. In other words, files which are intended to be seen. So, while it's not ideal t

Re: Tapestry exposes the list of css/js files in assets

2020-01-26 Thread Bob Harner
I believe Dmitry's solution will only work for assets on the classpath (under src/main/resources/META-INF/assets), because it is a ClasspathAssetProtectionRule. However, the same directory listing problem seems to exist for context asset directories (subdirectories under src/main/webapp),

Re: Tapestry exposes the list of css/js files in assets

2020-01-17 Thread Dmitry Gusev
gt; s.toLowerCase().endsWith(".properties"); >> > configuration.add("PropertiesFile", propertiesFileRule); >> > ClasspathAssetProtectionRule xmlFileRule = (s) -> >> > s.toLowerCase().endsWith(".xml"); >> > configurat

Re: Tapestry exposes the list of css/js files in assets

2020-01-16 Thread Dmitry Gusev
setProtectionRule xmlFileRule = (s) -> > > s.toLowerCase().endsWith(".xml"); > > configuration.add("XMLFile", xmlFileRule); > > } > > > > So as a possible workaround you could contribute another rule that vetoes > > asset requests that have

Re: Tapestry exposes the list of css/js files in assets

2020-01-16 Thread Nicolas Bouillon
round you could contribute another rule that vetoes > asset requests that have no file extension (or end with forward slash), > which should cover directory entries. > > On Thu, Jan 16, 2020 at 12:22 PM Nicolas Bouillon > wrote: > > > Hi all, > > > > Following a

Re: Tapestry exposes the list of css/js files in assets

2020-01-16 Thread Dmitry Gusev
s that have no file extension (or end with forward slash), which should cover directory entries. On Thu, Jan 16, 2020 at 12:22 PM Nicolas Bouillon wrote: > Hi all, > > Following a pen-test of our application, it has been raised that the > list of assets if visible as a directory list

Tapestry exposes the list of css/js files in assets

2020-01-16 Thread Nicolas Bouillon
Hi all, Following a pen-test of our application, it has been raised that the list of assets if visible as a directory listing. For example, we have a javascript file available at this location /assets/meta/z58f7f3d4/javascript/library.js but when we access /assets/meta/z58f7f3d4/javascript/ the

Re: Location of assets

2017-03-31 Thread Jaroslav Ciml
d Tapestry provides it on URL like /assets/ctx/7d7f78bd/images/myimage.png Especially, the generated path element (which is new in Tapestry 5.4) makes referencing in css imposible. Anyway, I will move all images to location like src/main/resources/META-INF/assets/images so that it can be referenced

Re: Location of assets

2017-02-24 Thread Christian Riedel
myimage.png‘); If both, your images and your css files are stored in src/main/webapp you can also use relative paths: background-image: url('../images/myimage.png‘); That being said, I prefer to have all assets in META-INF/images and META-INF/css for example. Relative paths have the advan

Location of assets

2017-02-24 Thread Jaroslav Ciml
Hi, I am trying to figure out what is the correct location of assets with Tapestry 5.4 and Maven directory structure. I will explain how do I understand it. Correct what is wrong please. From logical point of view, I can think of two types of assets - global and comopnent specific. A global

Re: problem accessing assets after migration to 5.4

2016-06-30 Thread Chris Poulsen
assets are usually in a specific path (resources/META-INF/assets/...) - Could it be that your file is not an asset and that it should be loaded using normal methods (classloader.getResourceAsStream or similar) -- Chris On Thu, Jun 30, 2016 at 8:23 PM, Thiago H de Paula Figueiredo < th

Re: problem accessing assets after migration to 5.4

2016-06-30 Thread Thiago H de Paula Figueiredo
On Thu, 30 Jun 2016 13:13:23 -0300, Qbyte Consulting wrote: Hi, Hi! I've changed my project deps to T5.4. After fixing some depricated page link methods my app compiles. However when I run I get exceptions from a menu loading service: is = assetSource.getClasspathAsset("menu.properties")

problem accessing assets after migration to 5.4

2016-06-30 Thread Qbyte Consulting
Hi, I've changed my project deps to T5.4. After fixing some depricated page link methods my app compiles. However when I run I get exceptions from a menu loading service: is = assetSource.getClasspathAsset("menu.properties").getResource() .openStream(); } catch (RuntimeException e) { final String

Re: Far Future Expiration Headers of Assets

2015-01-28 Thread George Christman
which we spoke about this before for future releases. I also think if we get this figured out it would help to reduce some of the hosting cost associated with the cloud. On Tue, Jan 27, 2015 at 3:10 PM, George Christman wrote: > In production mode Google / yslow have both been complaining

Re: Far Future Expiration Headers of Assets

2015-01-27 Thread George Christman
In production mode Google / yslow have both been complaining about assets missing expiration dates as well as the modules being too short. You can see an example here. https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.cardaddy.com%2F Now do to my lack of Tapestry

Re: Far Future Expiration Headers of Assets

2015-01-27 Thread Howard Lewis Ship
Further, for both modules and normal assets, there's etag support ... so most requsts for a module get a 304 and the browser can use its local cache. On Tue, Jan 27, 2015 at 10:55 AM, Howard Lewis Ship wrote: > Modules can't have a far-future expires header, because we can't p

Re: Far Future Expiration Headers of Assets

2015-01-27 Thread Howard Lewis Ship
Modules can't have a far-future expires header, because we can't put a fingerprint (asset checksum) into a module URI. All other assets have a checksum in the URI and get the far future expires header. The handling of this is different between development mode and production mode. S

Re: Far Future Expiration Headers of Assets

2015-01-27 Thread George Christman
expiration dates to the other core css style sheets (no expires) http://localhost:8080/etss/assets/meta/z64038ad2/tapestry5/tapestry.css (no expires) http://localhost:8080/etss/assets/meta/ze8a5779c/tapestry5/exception-frame.css (no expires) http://localhost:8080/etss/assets/meta/zceffa0e4/tapestry

Re: Far Future Expiration Headers of Assets

2015-01-27 Thread George Christman
owser caching" warning, I did not "solve" > the problem -- it appears to be a false alarm by Chrome PageSpeed: (i) > if one keeps the Chrome developer panel up and click around in a > Tapestry webapp, one should see that the assets are indeed cached > after the initial roun

Re: Far Future Expiration Headers of Assets

2014-12-22 Thread Harry Zhou
should see that the assets are indeed cached after the initial round of full requests ("200 from cache" will be shown for cached assets). No requests for these assets will actually be sent to server unless the user clicks the refresh button or run an audit with page reload from Chrome PageSp

Re: Far Future Expiration Headers of Assets

2014-12-22 Thread Chris Poulsen
apestry related: Chrome's PageSpeed audit tool chooses to > > ignore Tapestry's 10-year-in-the-future "Expires" response header. > > But during actual browsing the assets are actually cached (seeing "200 > > from cache"). > > >

Re: Far Future Expiration Headers of Assets

2014-12-22 Thread George Christman
gt; Problem solved. > > It is NOT Tapestry related: Chrome's PageSpeed audit tool chooses to > ignore Tapestry's 10-year-in-the-future "Expires" response header. > But during actual browsing the assets are actually cached (seeing "200 > from cache"). &g

Re: Far Future Expiration Headers of Assets

2014-12-21 Thread Harry Zhou
Hi Bob and Thiago, thank you for pointing me to the right direction! Problem solved. It is NOT Tapestry related: Chrome's PageSpeed audit tool chooses to ignore Tapestry's 10-year-in-the-future "Expires" response header. But during actual browsing the assets are actually cach

Re: Far Future Expiration Headers of Assets

2014-12-21 Thread Thiago H de Paula Figueiredo
that "resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers . . . " I read that "assets get a far-future expires header" and will be "client browsers will aggressively cache downloaded assets." So I am not s

Re: Far Future Expiration Headers of Assets

2014-12-21 Thread Bob Harner
xpiration may > not be cached by browsers . . . " > > I read that "assets get a far-future expires header" and will be > "client browsers will aggressively cache downloaded assets." So I am > not sure why responses for my assets all come with > "Cache-Con

Far Future Expiration Headers of Assets

2014-12-21 Thread Harry Zhou
Hi! About my T5.4 site, Google is complaining that "resources are missing a cache expiration. Resources that do not specify an expiration may not be cached by browsers . . . " I read that "assets get a far-future expires header" and will be "client browsers will aggr

Re: "assets" folder vulnerability

2014-07-07 Thread Geoff Callender
7 Jul 2014 10:30:42 -0300, Михаил Ярв < mixa_poi...@mail.ru > > wrote: > > > >> At present it is possible to view structure of application classes. All > >> you need is to follow "/assets/1.0.0-DEV/app/" url in Tapestry > >> application. > >

Re[2]: "assets" folder vulnerability

2014-07-07 Thread Михаил Ярв
5.3.7 Mon, 07 Jul 2014 11:14:59 -0300 от "Thiago H de Paula Figueiredo" : >On Mon, 07 Jul 2014 10:30:42 -0300, Михаил Ярв < mixa_poi...@mail.ru > wrote: > >> At present it is possible to view structure of application classes. All >> you need is to foll

Re: "assets" folder vulnerability

2014-07-07 Thread Thiago H de Paula Figueiredo
On Mon, 07 Jul 2014 10:30:42 -0300, Михаил Ярв wrote: At present it is possible to view structure of application classes. All you need is to follow "/assets/1.0.0-DEV/app/" url in Tapestry application. What Tapestry version are you using? -- Thiago H. de Paula Figueiredo Tape

"assets" folder vulnerability

2014-07-07 Thread Михаил Ярв
At present it is possible to view structure of application classes. All you need is to follow "/assets/1.0.0-DEV/app/" url in Tapestry application.

Re: [t5.4-beta-10] Unable to locate asset, It should be located at META-INF/assets

2014-06-08 Thread Geoff Callender
The new location protects the assets and allows Tapestry to serve them up however it wishes, eg. gzipped, renamed with checksum in name, etc. http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/META-INF-assets-in-5-4-td5714677.html On 8 Jun 2014, at 4:41 pm, Muhammad

Re: [t5.4-beta-10] Unable to locate asset, It should be located at META-INF/assets

2014-06-07 Thread Muhammad Gelbana
ot;css/plugins/morris/morris-0.4.3.min.css", > > "css/plugins/timeline/timeline.css", "css/sb-admin.css" }) > > > > *-* > > *Muhammad Gelbana* > > http://www.linkedin.com/in/mgelbana > > > > > > On Sun, J

Re: [t5.4-beta-10] Unable to locate asset, It should be located at META-INF/assets

2014-06-07 Thread Geoff Callender
eline.css", "css/sb-admin.css" }) > > *-* > *Muhammad Gelbana* > http://www.linkedin.com/in/mgelbana > > > On Sun, Jun 8, 2014 at 1:06 AM, Muhammad Gelbana > wrote: > >> Unable to locate ass >> ​​ >> et 'js/j

Re: [t5.4-beta-10] Unable to locate asset, It should be located at META-INF/assets

2014-06-07 Thread Muhammad Gelbana
---* *Muhammad Gelbana* http://www.linkedin.com/in/mgelbana On Sun, Jun 8, 2014 at 1:06 AM, Muhammad Gelbana wrote: > Unable to locate ass > ​​ > et 'js/jquery-1.10.2.js' for component Index:layout. It should be located > at META-IN > ​​ > F/assets/js/jquery-1.10.2.

[t5.4-beta-10] Unable to locate asset, It should be located at META-INF/assets

2014-06-07 Thread Muhammad Gelbana
Unable to locate ass ​​ et 'js/jquery-1.10.2.js' for component Index:layout. It should be located at META-IN ​​ F/assets/js/jquery-1.10.2.js ​ I've already placed this file in the specified location under the webapp folder (i.e. src/main/webapp) and put the mentioned files un

Assets t5.4

2014-05-15 Thread George Christman
Hi everyone, I'm getting the following error, (AssetSourceImpl.java:188) - Packaging of classpath assets has changed in release 5.4; Assets should no longer be on the main classpath, but should be moved to 'META-INF/assets/' or a sub-folder. Future releases of Tapestry may no

Re: Assets in component library

2014-04-01 Thread Howard Lewis Ship
Note that this will work differently, and more simply, in 5.4, where it's just a matter of putting them into the correct sub-folder of META-INF/assets. On Fri, Mar 28, 2014 at 2:09 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 28 Mar 2014 04:55:17

Re: Assets in component library

2014-03-28 Thread Thiago H de Paula Figueiredo
On Fri, 28 Mar 2014 04:55:17 -0300, Nathan Quirynen wrote: Hey Thiago, Hi! Please try src="${classpath:assets/components/languageselector/nl.png}" /> (notice the lack of slash before assets). -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant

Re: Assets in component library

2014-03-28 Thread Nathan Quirynen
I got it working with the following: public String getImagePath() { return assetSource.getClasspathAsset("classpath:com/company/tapestrylib/assets/components/languageselector/" + loopLocale.getLanguage() + ".png").toClientURL(); } + + Files located in: src/main/r

Re: Assets in component library

2014-03-28 Thread Nathan Quirynen
Hey Thiago, Thanks for the reply. I indeed use the maven structure and that's actually something I have tried, with the following error as result: Could not convert 'classpath:/assets/components/languageselector/nl.png' into a component parameter binding: Error parsing prop

Re: Assets in component library

2014-03-27 Thread Thiago H de Paula Figueiredo
On Thu, 27 Mar 2014 12:19:41 -0300, Nathan Quirynen wrote: Hi, Hi! I'm moving my components to a Tapestry component library. But I'm not sure how to handle images used in those components. Before I just put them in *src/main/webapp/images/* and then used ** But what's the right way of ha

Assets in component library

2014-03-27 Thread Nathan Quirynen
Hi, I'm moving my components to a Tapestry component library. But I'm not sure how to handle images used in those components. Before I just put them in *src/main/webapp/images/* and then used ** But what's the right way of handling images in a Tapestry library. I've been trying different things w

Re: 5.4 ckeditor requirejs / assets

2014-03-22 Thread George Christman
requirejs and have successfully >> got my js working, however I'm running into a brick wall when it comes to >> the css and images. It looks as if the css and images are being called >> directly from ckeditors js files, however 404 errors for those files. My >> assumptio

Re: 5.4 ckeditor requirejs / assets

2014-03-22 Thread George Christman
files, however 404 errors for those files. My > assumption is it has something to do with tapestry's assets, however I'm > not certain. Can anybody shine some light on this for me? > > ckeditor-config module > > requirejs.config({ > shim: { >

5.4 ckeditor requirejs / assets

2014-03-22 Thread George Christman
re being called directly from ckeditors js files, however 404 errors for those files. My assumption is it has something to do with tapestry's assets, however I'm not certain. Can anybody shine some light on this for me? ckeditor-config module requirejs.config({ shim: { 'ckeditor

Re: Caching of assets (js libraries, css etc.)

2014-03-14 Thread Luke Wilson-Mawer
OK, thanks for this. Seems like we're probably safe. Thanks, Luke On Fri, Mar 14, 2014 at 5:32 PM, Howard Lewis Ship wrote: > For normal assets, the URL directly includes a content hash value. This > covers stylesheets, images, fonts, and JavaScript libraries. In addition, >

Re: Caching of assets (js libraries, css etc.)

2014-03-14 Thread Howard Lewis Ship
For normal assets, the URL directly includes a content hash value. This covers stylesheets, images, fonts, and JavaScript libraries. In addition, assets provide both far-future expires headers and ETags, to assist with caching in the client or intermediate servers. Modules are a bit different

Caching of assets (js libraries, css etc.)

2014-03-14 Thread Luke Wilson-Mawer
In previous version the asset URLs contained the version, so they would change each time the version changed. In 5.4 this doesn't seem to be the case. Am I mistaken? If not, is this by design? And what's to stop assets being cached between releases of different versions of the softw

[5.4.22] Serious issue with assets and checksums - different for same file

2013-10-11 Thread Bård Magnus Kvalheim
Hi everybody. Today we've launched a website based on 5.4. We're very exited about the upcoming release(5.4) and I'll post separately about our experiences (mostly great). Post release we've identified a potential serious issue related to assets and their checksums. W

Re: [T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Lenny Primak
t to the new location; /assets/LIB-NAME/path.js ... the > LIB-NAME is determined from the library containing the component. > > > The error message only reports the 5.3 location; it should be updated to be > the 5.4 location (under META-INF/assets) and perhaps the 5.3 location as

Re: [T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Lenny Primak
ion, and Tapestry will find it, > with a warning. > > Or you can move it to the new location; /assets/LIB-NAME/path.js ... the > LIB-NAME is determined from the library containing the component. > > > The error message only reports the 5.3 location; it should be updated to be &

Re: [T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Howard Lewis Ship
You can leave the asset in the old location, and Tapestry will find it, with a warning. Or you can move it to the new location; /assets/LIB-NAME/path.js ... the LIB-NAME is determined from the library containing the component. The error message only reports the 5.3 location; it should be

Re: [T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Lenny Primak
asset here: META-INF/assets/flowlogix/js/DateFieldParserPatch.js Notice the lack of the com/flowlogix/web/... etc. The path in the error message is wrong. This is why I got so confused on where to put these assets. Should I file a JIRA? On Sep 5, 2013, at 7:56 PM, Lenny Primak wrote: > (ans

Re: [T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Lenny Primak
(answering my own question) Looks like the semantics have changed. Used to be that assets were looked up relative to class package name, now they are just looked up relative to root. On Sep 5, 2013, at 6:37 PM, Lenny Primak wrote: > I am trying to migrate FlowLogix library to T5.4... >

[T5.4] @Import(library=xxx) doesn't work for META-INF/assset/xxx assets from library

2013-09-05 Thread Lenny Primak
I am trying to migrate FlowLogix library to T5.4... There are a whole bunch of mixins there, that use JavaScript @Import(library="xxx.js"). I used to have those .js in the classpath in the same package. Now, with the new packaging scheme, I moved them to META-INF/assets/flowlogix.

Re: load all assets in folder

2013-05-12 Thread Jan Fryblik
 Oh, i thought there is some trick for that in Tapestry (as usually :)). So for completeness i'm sending my raw solution...   Thank you for advise.@Injectprivate Context context;@Injectprivate PersistentLocale persistentLocale;@Injectprivate AssetSource assetSource;File res

Re: load all assets in folder

2013-05-11 Thread Thiago H de Paula Figueiredo
On Sat, 11 May 2013 17:42:34 -0300, Jan Fryblik wrote:Hi guys,Hi!i just created simple slider component. Now i'm wondering, is somehow possible to load all images from context path? I mean, i have for instance folder /webapp/images/slider and i need to get all images in the directory without know

load all assets in folder

2013-05-11 Thread Jan Fryblik
Hi guys,i just created simple slider component. Now i'm wondering, is somehow possible to load all images from context path? I mean, i have for instance folder /webapp/images/slider and i need to get all images in the directory without knowing image names. Thanks for answer.BR,Jan

Re: Switching assets based on something different than language

2012-12-21 Thread Howard Lewis Ship
Tapestry 5.3 introduces the idea of skinning: its broken up into a couple of parts. One part is looking at the request to determine the "axes" (plural of axis) of customization. In your case, one axis would be locale (which is built into Tapestry). The other axis would be based on tenant, which yo

Re: Switching assets based on something different than language

2012-12-19 Thread Thiago H de Paula Figueiredo
On Wed, 19 Dec 2012 14:33:55 -0200, nquirynen wrote: Maybe you can make an implementation of AssetSource Better yet, an AssetFactory. Take a look in the Tapestry sources of ClasspathAssetFactory and ContextAssetFactory. -- Thiago H. de Paula Figueiredo -

Re: Switching assets based on something different than language

2012-12-19 Thread nquirynen
Maybe you can make an implementation of AssetSource -- View this message in context: http://tapestry.1045711.n5.nabble.com/Switching-assets-based-on-something-different-than-language-tp5718854p5718856.html Sent from the Tapestry - User mailing list archive at Nabble.com

Switching assets based on something different than language

2012-12-19 Thread Arno Haase
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tapestry has a great mechanism to switch assets based on the user's language. Now I would like to have something like that based not on language but the user's tenant (the system is multi-tenanted). So - what is the preferred approach

Re: Dynamic Assets

2012-10-28 Thread Dragan Sahpaski
e.getExpandedAsset("context:/img/icon/star/starScore00.png").toClientURL(); > > thx > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Dynamic-Assets-tp5717354p5717361.html > Sent from

Re: Dynamic Assets

2012-10-28 Thread sommeralex
works now with @Inject private AssetSource assetSource; assetSource.getExpandedAsset("context:/img/icon/star/starScore00.png").toClientURL(); thx -- View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-Assets-tp5717354p5717361.html Sen

Re: Dynamic Assets

2012-10-28 Thread sommeralex
apidocs/org/apache/tapestry5/services/AssetSource.html > > Cheers, > Dragan Sahpaski > > > On Sun, Oct 28, 2012 at 8:55 PM, sommeralex <[hidden > email]<http://user/SendEmail.jtp?type=node&node=5717359&i=0>> > wrote: > > > Hello, > > > &g

Dynamic Assets

2012-10-28 Thread sommeralex
Hello, Which is the best way for using dynamic assets? In one of my classes, i have too much asset declarations now.. @Inject @Path("context:/img/icon/star/starScore20.png") private Asset star20Asset; What i would prefer is a method which directly is gene

Re: PerThread Scope and Assets

2012-07-27 Thread Juan E. Maya
Thanks Howard :) On Fri, Jul 27, 2012 at 6:10 PM, Howard Lewis Ship wrote: > I wouldn't worry about it; there's a lot of caching going on inside > AssetSourceImpl. > > Don't prematurely optimize ... but plan to do real performance testing > if you are expecting your application to be regurlarily

Re: PerThread Scope and Assets

2012-07-27 Thread Howard Lewis Ship
I wouldn't worry about it; there's a lot of caching going on inside AssetSourceImpl. Don't prematurely optimize ... but plan to do real performance testing if you are expecting your application to be regurlarily saturated. Otherwise, keep your eyes on your database queries and let the rest shake o

PerThread Scope and Assets

2012-07-27 Thread Juan E. Maya
Hello, first of all i am very glad to go back to work with T5 :) I was missing the mailing list. :) I know the PerThread scope service are created per request, but i don't want the object to be created for every asset that is loaded, i only needed for the PageRender cycle. Is there a way to avoid

Re: Recommended method to reference assets in .css file?

2012-04-25 Thread Lenny Primak
And what an awesome module it is! On Apr 25, 2012, at 8:01 AM, Cezary Biernacki wrote: > On Wed, Apr 25, 2012 at 1:09 AM, yazdog8 wrote: > >> If you're using Less CSS (or maybe sass possibly), you can set some basic >> variables at the top of your file that can be used as a cache buster in >>

Re: Recommended method to reference assets in .css file?

2012-04-25 Thread badluck13
message in context: http://tapestry.1045711.n5.nabble.com/Recommended-method-to-reference-assets-in-css-file-tp5663514p5664720.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users

Re: Recommended method to reference assets in .css file?

2012-04-25 Thread Cezary Biernacki
On Wed, Apr 25, 2012 at 1:09 AM, yazdog8 wrote: > If you're using Less CSS (or maybe sass possibly), you can set some basic > variables at the top of your file that can be used as a cache buster in > your > paths. > > http://lesscss.org/#-variables > And you can even directly integrate LessCSS w

Re: Recommended method to reference assets in .css file?

2012-04-25 Thread trsvax
e.com/Recommended-method-to-reference-assets-in-css-file-tp5663514p5664625.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e

Re: Recommended method to reference assets in .css file?

2012-04-24 Thread David Rees
On Tue, Apr 24, 2012 at 4:04 PM, Chris Mylonas wrote: > Good question - I don't know about from within a CSS file. > ... > Looking into the tapestry source, specifically   > src/main/resources/org/apache/tapestry5/tapestry-console.css > it uses relative links to the pics in > src/main/resources/o

Re: Recommended method to reference assets in .css file?

2012-04-24 Thread yazdog8
rence-assets-in-css-file-tp5663514p5663546.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: us

Re: Recommended method to reference assets in .css file?

2012-04-24 Thread Chris Mylonas
at's the recommended method to reference assets in a .css file - for > example background images? > > Currently I use a hard-coded relative URL, but this has the drawback > of causing the browser to cache the resource after it's changed > leading to browsers caching old reso

Recommended method to reference assets in .css file?

2012-04-24 Thread David Rees
What's the recommended method to reference assets in a .css file - for example background images? Currently I use a hard-coded relative URL, but this has the drawback of causing the browser to cache the resource after it's changed leading to browsers caching old resources unless I chang

Re: RequestFilter running after serving assets

2012-04-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 Apr 2012 21:08:10 -0300, Manuel Sugawara wrote: Yeah, I guess that will work. So, let me rephrase, When is appropriate to use a dispatcher and when a filter? Dispatchers are meant to provide a response to a request. Request filters are better suited for applying logic which is

Re: RequestFilter running after serving assets

2012-04-04 Thread Manuel Sugawara
some content from the database and I >> would like that it run after the assets dispatcher in order to avoid the >> creation of the service that access the database. Is this possible?. >> > > Why don't you write it as a Dispatcher instead? Yeah, I guess that will wor

Re: RequestFilter running after serving assets

2012-04-04 Thread Thiago H. de Paula Figueiredo
On Wed, 04 Apr 2012 19:47:48 -0300, Manuel Sugawara wrote: Hi all, Hi! I have a RequestFilter that serves some content from the database and I would like that it run after the assets dispatcher in order to avoid the creation of the service that access the database. Is this possible

RequestFilter running after serving assets

2012-04-04 Thread Manuel Sugawara
Hi all, I have a RequestFilter that serves some content from the database and I would like that it run after the assets dispatcher in order to avoid the creation of the service that access the database. Is this possible?. How are dispatchers and filters related?. Any pointers to the docs would

Re: Serving Tapestry5 Assets As Static Resources

2012-03-13 Thread Paul Stanton
yes i meant the minimizer, but howard has also hinted tapestry may do more modification in future: Re: Versioned assets (22/02/2012 6:05 AM) "The perfect solution would involve the following: - The version number if replaced with the SHA1 hash of the resource's (uncompressed) cont

Re: Serving Tapestry5 Assets As Static Resources

2012-03-12 Thread Dmitry Gusev
3/2012 12:02 AM, Dmitry Gusev wrote: > >> FYI: >> >> http://dmitrygusev.blogspot.**com/2012/03/serving-tapestry5-** >> assets-as-static.html<http://dmitrygusev.blogspot.com/2012/03/serving-tapestry5-assets-as-static.html> >> >> > ---

Re: Serving Tapestry5 Assets As Static Resources

2012-03-11 Thread Paul Stanton
nice! i'd like to see the checksum approach in tapestry and since css is already modified on the way out, the checksum url 'could' be applied to relative paths in css? maybe... On 12/03/2012 12:02 AM, Dmitry Gusev wrote: FYI: http://dmitrygusev.blogspot.com/2012/03/serving-t

Serving Tapestry5 Assets As Static Resources

2012-03-11 Thread Dmitry Gusev
FYI: http://dmitrygusev.blogspot.com/2012/03/serving-tapestry5-assets-as-static.html -- Dmitry Gusev AnjLab Team http://anjlab.com

Re: Question about caching of assets ...

2012-02-29 Thread Thiago H. de Paula Figueiredo
On Wed, 29 Feb 2012 04:56:17 -0300, Gunnar Eketrapp wrote: Hi! Hi! Would it be possible to tell clients to cache assets for ever and use the version to force a reload. I.e. the way I thought it worked ... As Steve said, you can't control what the browser requests. The Tapestry

Re: Question about caching of assets ...

2012-02-28 Thread Gunnar Eketrapp
Hi! Caching seems complex and I am fairly new to it. I found out that T5 delivers a 304 for assets that have not been modified since they where fetched. I.e. there is one server request per asset. [When serving an asset T5 delivers a last modified header. And clients sends If-Modified-Since

Re: Question about caching of assets ...

2012-02-27 Thread Steve Eynon
ans that the client has to perform a request for each > asset/image. > > I thought that the adding of the application version to the assets url was > there to inform clients when assets needed to be refetched > and that they should be fetched from client cache (without a request)

Question about caching of assets ...

2012-02-27 Thread Gunnar Eketrapp
the adding of the application version to the assets url was there to inform clients when assets needed to be refetched and that they should be fetched from client cache (without a request) otherwise. For my images, the ideal would be as Howard pointed out to add a hashed signature to my image url:s

Re: Versioned assets

2012-02-24 Thread Paul Stanton
ct could act as a way to avoid rewriting the CSS? On Sun, Feb 19, 2012 at 7:57 PM, Paul Stanton wrote: Hi Cezary, I think I have the same need as you. We use load balanced servers, and when upgrading we upgrade one at a time so that there is always a server running. But the side effect is

Re: Versioned assets

2012-02-24 Thread Lance Java
Most of the time, you should avoid using the regex methods on the String class (split, matches, replace etc) as these will compile the java.util.regex.Pattern for every invocation. Instead, you should Pattern.compile(regex) once and save the result then use Pattern.matches(value). On Wednesday, 2

Re: Versioned assets

2012-02-23 Thread Steve Eynon
f (path.matches(pathPrefixPattern)) >>>>            { >>>>                // send 302 temporary redirect to the version this server >>>> is >>>> using >>>>                String newPath = request.getContextPath() + >>>> path.re

Re: Versioned assets

2012-02-21 Thread Paul Stanton
t as a way to avoid rewriting the CSS? On Sun, Feb 19, 2012 at 7:57 PM, Paul Stantonwrote: Hi Cezary, I think I have the same need as you. We use load balanced servers, and when upgrading we upgrade one at a time so that there is always a server running. But the side effect is that the up

Re: Versioned assets

2012-02-21 Thread Paul Stanton
and when upgrading we upgrade one at a time so that there is always a server running. But the side effect is that the upgraded server can receive requests for the old assets, and we don't want to fail in this case. In the past (5.1) I monkey-patched AssetResourceLocatorImpl to allow<= ver

Re: Versioned assets

2012-02-21 Thread Howard Lewis Ship
302 redirect may be the correct solution, and Tapestry >> could support this pretty reasonably. >> >> The perfect solution would involve the following: >> - The version number if replaced with the SHA1 hash of the resource's >> (uncompressed) content >> - Al

  1   2   3   4   >