You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(28) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(103) |
Feb
(44) |
Mar
(65) |
Apr
(140) |
May
(72) |
Jun
(233) |
Jul
(466) |
Aug
(51) |
Sep
(2) |
Oct
(17) |
Nov
(1) |
Dec
(7) |
2004 |
Jan
(8) |
Feb
(5) |
Mar
(28) |
Apr
(9) |
May
(7) |
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
(3) |
May
(24) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(12) |
2006 |
Jan
|
Feb
(3) |
Mar
(8) |
Apr
(59) |
May
|
Jun
|
Jul
|
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
(3) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
(3) |
2008 |
Jan
|
Feb
(1) |
Mar
(16) |
Apr
(2) |
May
(2) |
Jun
|
Jul
(11) |
Aug
(3) |
Sep
(9) |
Oct
(9) |
Nov
(44) |
Dec
(34) |
2009 |
Jan
(12) |
Feb
(14) |
Mar
(11) |
Apr
(16) |
May
(41) |
Jun
(19) |
Jul
(33) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
(7) |
2010 |
Jan
(8) |
Feb
(50) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(16) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Eric B. R. <eb...@tc...> - 2003-05-14 05:05:03
|
On Tuesday, May 13, 2003, at 10:48 PM, Eric B. Ridge wrote: >> This does look really good, but I wonder how many people will >> realistically use the syntax to create a mapping of more than a >> couple of items - as we don't support multi-line RValues (AFAIK) this >> would get "hella-ugly". > > I was thinking about this today, and I think it may be possible to > allow <CRLF>'s in there. This is probably going to freak Brian out... Okay, not only did I get multi-line values to work for maps and lists, but I managed to hook us up with multi-line #ifs, #macros(), $functions(), and other $Variable.methodCalls(). Basically anything that takes an argument list... plus expressions. Checkout the attached template. Yeah, it's ugly, but it parses and executes correctly... along with our existing test suite. The multi-line #if stuff is just way cool! Oh yeah, I also changed the map syntax to use a colon instead of "=>". I've committed all of this into CVS in the hopes that somebody will attempt to use it. Still gotta do test cases... and losts of 'em. eric |
From: Eric B. R. <eb...@tc...> - 2003-05-14 02:48:37
|
On Tuesday, May 13, 2003, at 06:16 PM, Marc Palmer wrote: > On Tue, 13 May 2003 01:34:33 -0400, Eric B. Ridge <eb...@tc...> = wrote: > =A0 >> <snip> >> A built-in Map declaration syntax would help here. E.g., > <snip> >> Since I don't see this coming anytime soon, how about a $map=20 >> function:0 >> =A0 >> Disclaimer: I only spent an hour and 15 minutes on this... > =A0 > This does look really good, but I wonder how many people will=20 > realistically use the syntax to create a mapping of more than a couple=20= > of items - as we don't support multi-line RValues (AFAIK) this would=20= > get "hella-ugly". I was thinking about this today, and I think it may be possible to=20 allow <CRLF>'s in there. #set $map =3D { "key" : "value", "key2" : "value2" } I'm gunna give it a go tonight and see what happens. I'm also going to=20= change "=3D>" to ":", as Keats suggested. If I can get this to work for=20= {}, I might try it for [] (lists) too. > =A0I think the most common use would be #set $mymap =3D {} and then a = list=20 > of #set calls to set properties. I agree (<CRLF>'s or not)... which, in my opinion, is all the more=20 reason to have it around! I can already see a ton of uses for this. =20 It's simple. It's intuitive (imho), and WM now natively supports a=20 very standard java datatype. > On that basis I can't see it being much more useful than my #newobject=20= > directive Except you can't use #newobject in-line in a method call, but you can=20 use {}: $Object.doSomething({"key" : "value"}) Plus, you have the ability to use (evaluated) $variables as _key_ names=20= (when defining the map, of course). This isn't very helpful for doing=20= output, but if the point of your template is to build up some kind of=20 complicated Map structure to pass along somewhere else, it'll be very=20 useful. > (sorry still not in CVS), and the directive has the "inherits"=20 > functionality to virtually "inherit" properties from another=20 > #newobject created object (or Map). Also have copyFrom() and copyTo=20 > methods and things like that. Well, and so does {}: #set $map =3D {"a" : "b", "c" : "d" } #set $map2 =3D $map.clone() #set $map3 =3D {} $map3.putAll($map2) > =A0I know this is all moot as I haven't even committed it to CVS, but=20= > there is so much to do :( :) eric= |
From: Marc P. <ma...@an...> - 2003-05-13 23:01:28
|
On Tue, 13 May 2003 23:36:28 +0100, Marc Palmer <ma...@an...> wrote: > Are there any other solutions you guys can think of? PS. I forgot to mention that of course I can make the servlet serve ALL files from a separate doc root set in the config, which means the servlet container would be serving images and static content too, without processing. This would be a serious performance hit I believe, as we would lose the benefit of using a connector such as Apache mod_jk2 to serve files from the webapp document root. It is a solution, but I don't think it's that desirable is it? ...or will deferring to the container's request dispatcher somehow allow some native optimisation of returning our stream once I have located the resource file from a directory and opened a stream to it? However, setting up Tomcat AND Apache and mod_jk2 is likely to be something most webheads (vs. javaheads)will be unlikely to enjoy playing around with. Perhaps a straight "serve everything through servlet container" approach would be the solution? Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Marc P. <ma...@an...> - 2003-05-13 22:38:26
|
Hiya, I was wondering if you guys can share some thoughts on a deployment issue with the forthcoming "WM app". The problem is with the WAR web-application concept really. I want this app to be able to serve (and process) *.wmt files out of the box. You just install the webapp WAR, webapps/ignition is created automatically, and you stick your templates under webapps/ignition. These pages are retrieved simply using a URI that matches with a file- mapping in web.xml (i.e. *.wmt) - or by directly referring to the servlet and document by name (http://yourserver:8080/ignition/engine/yourdoc.wmt). The file-mapping scheme is nicer, but only works if the templates are under the webapp's document root (not WEB-INF) but that is no big deal unless you accidentally delete your web.xml in which case all your templates are downloaded as text (oh yes, I did it by mistake). The big WIN with using file-mapping and templates in your webapp doc root is that you can use relative links in your pages to other documents (templates or not) and images. If referring to the servlet by name you can use relative links still for templates, but anything else (static HTML or images) will not work relative. This makes it completely natural for web developers. What we want specifically, is the same behaviour you can experience with JSP - your templates in with your normal documents, so that links work as you'd expect. This all currently works fine with the webapp. Except when you want to re- deploy the webapp to upgrade it. If you have a .WAR to upgrade with, you can't (well I can't) get Tomcat 4.x to overwrite the existing webapps/ignition directory when doing an auto- deploy. You have to delete the directory and then restart tomcat with the new .WAR in place ready for auto-deploy. Now this totally sucks because it makes upgrading complete hell. Not only do you have to stop Tomcat, you also have to copy all your document files back over the new upgraded auto-deployed webapps/ignition directory. This is a bit like having to reinstall your entire httpd doc root just to upgrade apache. It's a nightmare. Now I could easily allow WM Ignition to get its templates from a path - outside- of the webapp directory tree. However this also breaks relative linking, as a servlet file-mapping will not work if the documents are not under the webapp docroot. So in that scenario we win on upgrading ease, but lose a lot in linking ease of use. Once scenario I have thought of is using Tomcat's global "web.xml" to set up the ignition servlet just like Jasper is set up - i.e. for *.wmt files in any web application. This would be a perfect solution - except I do not want to tie us to Tomcat. Is this a standard feature of servlet containers these days, or is it peculiar to Tomcat? Are there any other solutions you guys can think of? It is highly desirable to have the WebMacro templates in exactly the same place existing HTML or other content will be stored. We can't have people losing their content when they upgrade - and we shouldn't expect them to have to manually unzip the .WAR file over their existing webapps directory. ...why won't Tomcat just redeploy a .WAR? It's very annoying. All the options are on. Is this a problem peculiar to Tomcat 4.1 - do other servlet containers happily redeploy a .WAR without requiring a restart or the deletion of the webapp directory? Thanks in advance. -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Marc P. <ma...@an...> - 2003-05-13 22:17:34
|
On Tue, 13 May 2003 01:34:33 -0400, Eric B. Ridge <eb...@tc...> wrote: > <snip> > A built-in Map declaration syntax would help here. E.g., <snip> > Since I don't see this coming anytime soon, how about a $map function:0 > > Disclaimer: I only spent an hour and 15 minutes on this... This does look really good, but I wonder how many people will realistically use the syntax to create a mapping of more than a couple of items - as we don't support multi-line RValues (AFAIK) this would get "hella-ugly". I think the most common use would be #set $mymap = {} and then a list of #set calls to set properties. On that basis I can't see it being much more useful than my #newobject directive (sorry still not in CVS), and the directive has the "inherits" functionality to virtually "inherit" properties from another #newobject created object (or Map). Also have copyFrom() and copyTo methods and things like that. I know this is all moot as I haven't even committed it to CVS, but there is so much to do :( Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Eric B. R. <eb...@tc...> - 2003-05-13 20:07:08
|
On Tuesday, May 13, 2003, at 03:42 PM, Keats wrote: > Eric, > > This is way cool! Personally I'd vote for colons, but I can live with > the > "=>" if there is some advantage to this. Colons works for me too. => is kinda tricky to type. I'll try to change it tonight. eric > You rock. > > Keats > ----- Original Message ----- > From: "Eric B.Ridge" <eb...@tc...> > To: "Keats" <ke...@ea...>; > <web...@li...> > Sent: Tuesday, May 13, 2003 1:34 AM > Subject: Map Support (was: Re: [Webmacro-devel] #templet directive) > > >> <snip> >>> A built-in Map declaration syntax would help here. E.g., >> <snip> >>> Since I don't see this coming anytime soon, how about a $map >>> function: >> >> Disclaimer: I only spent an hour and 15 minutes on this... >> >> I've just committed some highly experimental Map support into CVS. >> >> #set $map = { "key" => "value", "foo" => "bar" } >> $map.key >> $map.foo >> >> Along with all the variants such as a map of maps, an empty map (#set >> $foo = {}), and of course using $variables as keys and values. >> >> I haven't written test cases yet, but some quick-n-dirty standalone >> testing shows it works, PLUS all existing test cases still pass. woo >> hoo! >> >> We can tweak the syntax, but I *really* like having the curly braces >> around the map. Plus, I tried to make it work with square brackets >> but >> javacc got confused with lists, and I don't understand LOOKAHEAD yet. >> >> Right now it uses a java.util.HashMap as the backing store, but I'd >> like to somehow make this configurable via WebMacro.properties, so we >> can use any Map implementation. Maybe TreeMap or some custom >> CaseInsensitiveStringKeyMapThingie so $map.Key and $map.keY are the >> same thing. >> >> Who knows. But I think this is a good start. >> >> eric >> >> > |
From: Keats <kea...@di...> - 2003-05-13 19:42:43
|
Eric, This is way cool! Personally I'd vote for colons, but I can live with the "=>" if there is some advantage to this. You rock. Keats ----- Original Message ----- From: "Eric B.Ridge" <eb...@tc...> To: "Keats" <ke...@ea...>; <web...@li...> Sent: Tuesday, May 13, 2003 1:34 AM Subject: Map Support (was: Re: [Webmacro-devel] #templet directive) > <snip> > > A built-in Map declaration syntax would help here. E.g., > <snip> > > Since I don't see this coming anytime soon, how about a $map function: > > Disclaimer: I only spent an hour and 15 minutes on this... > > I've just committed some highly experimental Map support into CVS. > > #set $map = { "key" => "value", "foo" => "bar" } > $map.key > $map.foo > > Along with all the variants such as a map of maps, an empty map (#set > $foo = {}), and of course using $variables as keys and values. > > I haven't written test cases yet, but some quick-n-dirty standalone > testing shows it works, PLUS all existing test cases still pass. woo > hoo! > > We can tweak the syntax, but I *really* like having the curly braces > around the map. Plus, I tried to make it work with square brackets but > javacc got confused with lists, and I don't understand LOOKAHEAD yet. > > Right now it uses a java.util.HashMap as the backing store, but I'd > like to somehow make this configurable via WebMacro.properties, so we > can use any Map implementation. Maybe TreeMap or some custom > CaseInsensitiveStringKeyMapThingie so $map.Key and $map.keY are the > same thing. > > Who knows. But I think this is a good start. > > eric > > |
From: Marc P. <ma...@an...> - 2003-05-13 14:11:33
|
Hi, I haven't yet seen a nice solution for the HTML escaping problem. I've tried several solutions myself over the years, and the most successful one to date was having my servlet automatically generate HTMLEscape'd clones of objects to put into the template. Calling $Text.HTMLEscape or similar is just horribly ugly in complex templates. However that doesn't work if you are just using simple generic helper classes to bring in data into WM templates. i.e. our XML Helper. You can get all the data you like but it is in unescaped form. Now from a design point of view I don't want to add a "setHTMLEscaping(boolean)" property to our helper. It breaks an otherwise elegant and orthogonal design. However it is the easiest solution for now. What I have thought of though, is some kind of directive mechanism for setting a filter for all values evaluated in the template. i.e. #set $myVar = "This is some <<<unescaped>>> text & I like it" Unescaped: $myVar #setfilter "htmlescape" Auto-escaped: $myVar #setfilter "none" Unescaped again: $myVar The output of this would be: Unescaped: This is some <<<unescaped>>> text & I like it Auto-escaped: This is some <<<unescaped>>> text & I like it Unescaped again: This is some <<<unescaped>>> text & I like it The idea here being that we have some way, from a directive (perhaps using package access code), to hook into the evaluation mechanism of WM and insert a filter that will execute on EVERY evaluation, after the result has been converted to a string if necessary. i.e. public interface WMEvaluationFilter { String filterValue( String src) } Trivial - but whether we can plug this into WM easily is yet to be determined. What do you think? I think this is a very nice solution to the problem as you can turn escaping on and off during template evaluation, and you don't need to write ugly $Text.HTMLEscape everywhere. It also means you could provide other filters that do interesting things, as I am sure HTML escaping is not the only boring conversion task we will need to do in coming years. What about producing XML output and using customised escaping/entities. Another possibility might be, instead of using a directive, have a special syntax for escaped evaluation, and set the escaping once in a template as needed - i.e: $@myVar The $@ could signify evaluation with filtering, and #setfilter or similar is only used if you want to change the default filter. Any thoughts? Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Eric B. R. <eb...@tc...> - 2003-05-13 05:34:41
|
<snip> > A built-in Map declaration syntax would help here. E.g., <snip> > Since I don't see this coming anytime soon, how about a $map function: Disclaimer: I only spent an hour and 15 minutes on this... I've just committed some highly experimental Map support into CVS. #set $map = { "key" => "value", "foo" => "bar" } $map.key $map.foo Along with all the variants such as a map of maps, an empty map (#set $foo = {}), and of course using $variables as keys and values. I haven't written test cases yet, but some quick-n-dirty standalone testing shows it works, PLUS all existing test cases still pass. woo hoo! We can tweak the syntax, but I *really* like having the curly braces around the map. Plus, I tried to make it work with square brackets but javacc got confused with lists, and I don't understand LOOKAHEAD yet. Right now it uses a java.util.HashMap as the backing store, but I'd like to somehow make this configurable via WebMacro.properties, so we can use any Map implementation. Maybe TreeMap or some custom CaseInsensitiveStringKeyMapThingie so $map.Key and $map.keY are the same thing. Who knows. But I think this is a good start. eric |
From: Keats <kea...@di...> - 2003-05-12 21:52:22
|
I have created a directive version of the TemplateTool called #templet. This lets you define a reusable "Templet" within your template that can be evaluated with different values in the context. (See the example script at the end of this message.) It seems to be working pretty well, but I'm still struggling to find an acceptable syntax for setting context values. Currently it works the same way as the $template tool, i.e., you can: 1) pass an array of values to eval(), which will be put in the context as $arg1, $arg2, etc: $templet.eval([$x, $y, $z]) 2) pass an array of values and an array of names to eval(), so the values will get put into the context as $name1, $name2, etc: $templet.eval([$x, $y, $z], ["name1", "name2", "name3"]) 3) pass a Map to eval() whose contents get copied into the templet context. (This requires you to have the Map already): #set $map.name1=$x #set $map.name2=$y #set $map.name3=$z $templet.eval($map) 4) put the values into the templet context directly prior to calling eval(): #set $templet.Context.name1=$x (or equivalently: #set $templet.Args.name1=$x) #set $templet.Context.name2=$y #set $templet.Context.name3=$z $templet.eval() None of the above options are particularly pretty. Perhaps a separate directive for invoking the templet would be better. E.g., #eval $templet #arg $name1=$x #arg $name2=$y #arg $name3=$z I haven't played with subdirectives, but I think I could do this. But I'm not sure this is much of an improvement. A built-in Map declaration syntax would help here. E.g., $templet.eval([name1=$x, name2=$y, name3=$z]) or to follow what I think is the new Velocity syntax: $templet.eval([{"name1" : $x} {"name2" : $y} {"name3" : $z}]) Since I don't see this coming anytime soon, how about a $map function: $map(["name1", $x, "name2", $y, "name3", $z]) and $templet.eval($map(["name1", $x, "name2", $y, "name3", $z])) A #properties directive would be kind of cool: #properties $props { name1: $x name2: $y name3: $z } This could just parse the block and stream it to a Properties.load(). Then you could say: $templet.eval($props) Or how about: #eval $templet using { name1: $x name2: $y name3: $z } Any input would be appreciated. Keats ==================================================== Sample Script: ==================================================== <h3>Example generating a bulleted list using \#templet</h3> #templet $ul { <ul> #foreach $item in $arg1 { <li>$item</li> } </ul> } $ul.eval([["item 1", "another item", "last but not least"]]) <h3>Another list example</h3> $ul.eval([["First", "Second", "Third"]], ["arg1"]) <h3>Yet another</h3> #set $ul.Context.arg1 = ["Larry", "Moe", "Curly"] $ul.eval() |
From: <Kea...@di...> - 2003-05-07 20:44:40
|
If you can use a Servlet 2.3+ environment, you could use a simple Filter Servlet to do this. Otherwise you're looking at a pretty significant parser change AFAICT. Keats Marc Palmer <ma...@an...> Sent by: web...@li... 05/07/2003 03:30 PM Please respond to marc To: web...@li... cc: Subject: Re: [Webmacro-devel] Use WM with "ignore whitespace"? On Wed, 7 May 2003 11:20:13 -0400, <Kea...@di...> wrote: > This is has been kicking around for a long time and no one has come up > with an appealing solution. I have thought about creating a simple #trim > directive which would remove leading whitespace from each line in a > block. You could then wrap some or all of your template in a #trim { }. Yes but I mean the -whole-template, i.e. at the parser level. Surely this should be possible, if it can't do it now? Marc ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com _______________________________________________ Webmacro-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Marc P. <ma...@an...> - 2003-05-07 19:31:03
|
How do I know? I saw this in page source: <!-- Cannot expand $FULL_BUNDLE.Close_this_window_1141 at /usr/local/fews- 01/content/wwwroot/app/help/free/mtwain_story.wm:33.48: Value is null --> :) -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Marc P. <ma...@an...> - 2003-05-07 19:28:56
|
On Wed, 7 May 2003 11:20:13 -0400, <Kea...@di...> wrote: > This is has been kicking around for a long time and no one has come up > with an appealing solution. I have thought about creating a simple #trim > directive which would remove leading whitespace from each line in a > block. You could then wrap some or all of your template in a #trim { }. Yes but I mean the -whole-template, i.e. at the parser level. Surely this should be possible, if it can't do it now? Marc |
From: <Kea...@di...> - 2003-05-07 15:25:46
|
This is has been kicking around for a long time and no one has come up with an appealing solution. I have thought about creating a simple #trim directive which would remove leading whitespace from each line in a block. You could then wrap some or all of your template in a #trim { }. You can do this now with #setblock and $Text, e.g., #setblock $block { ... template here ... } $Text.ltrimBlock($block) But this is obviously pretty kludgy. #trim could also have other options to various amounts of whitespace trimming, e.g., leading only, trailing only, leading and trailing, newlines, etc. Keats Marc Palmer <ma...@an...> Sent by: web...@li... 05/07/2003 10:29 AM Please respond to marc To: web...@li... cc: Subject: [Webmacro-devel] Use WM with "ignore whitespace"? Hi, Do we currently have the ability to set WM to completely ignore template whitespace when writing output? If not, would it be possible to do this? It's just that for outputting text files using helpers/context tools to format the text nicely, it would be much cleaner if whitespace in the template was not included in the output at all. Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com _______________________________________________ Webmacro-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Marc P. <ma...@an...> - 2003-05-07 14:28:57
|
Hi, Do we currently have the ability to set WM to completely ignore template whitespace when writing output? If not, would it be possible to do this? It's just that for outputting text files using helpers/context tools to format the text nicely, it would be much cleaner if whitespace in the template was not included in the output at all. Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Marc P. <ma...@an...> - 2003-05-06 18:45:33
|
Looks good to me too - although I don't really like the functions mechanism in WM... would prefer a directive :) Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Lane S. <la...@op...> - 2003-05-06 14:38:55
|
Yes. Definitely check this in. What is new to me is that the that the expressions ($x+1) and (1*2*3*4*5) were evaulated without the a left hand assignment statement. Could you elaborate on this a bit. nice catch! -Lane Kea...@di... wrote: > FYI, I tested the solution that I outlined and it works. I think this > is the simplest Java class since HelloWorld, maybe even simpler. Here > is the stripped down version: > > package org.webmacro.util; > public class Eval { > public static Object eval(Object o){ return o; } > } > > In WebMacro.properties I added: > > Functions.eval: org.webmacro.util.Eval.eval > > And then in a template I wrote: > > #set $x=99 > \$eval(\$x + 1)=$eval($x +1) > <br> > \$eval(1*2*3*4*5)=$eval(1*2*3*4*5) > > and got: > > $eval($x + 1)=100 > $eval(1*2*3*4*5)=120 > > Is this worthy of inclusion in the core? > > Keats > > > N¬±ùÞµés(S(X¬²s('²S(Þu¼"+)äç¤Yé\¢g¢z('s(½éá¶Ú?þØbz(HzG(>ûYææiÊèuëÞ-f¢-)à-+-YææiÊèuëÞ-X¬¶Ë(º·~S(àzw+Ûi³ÿåS(Ël²<«qçè®§zßåS(ËlþX¬¶)ߣünfoe®++^vel= |
From: <Kea...@di...> - 2003-05-06 05:38:40
|
PEZPTlQgZmFjZT0iRGVmYXVsdCBTYW5zIFNlcmlmLCBWZXJkYW5hLCBBcmlhbCwgSGVsdmV0aWNh LCBzYW5zLXNlcmlmIiBzaXplPTI+PGRpdj5GWUksIEkgdGVzdGVkIHRoZSBzb2x1dGlvbiB0aGF0 IEkgb3V0bGluZWQgYW5kIGl0IHdvcmtzLiZuYnNwOyBJIHRoaW5rIHRoaXMgaXMgdGhlIHNpbXBs ZXN0IEphdmEgY2xhc3Mgc2luY2UgSGVsbG9Xb3JsZCwgbWF5YmUgZXZlbiBzaW1wbGVyLiZuYnNw OyBIZXJlIGlzIHRoZSBzdHJpcHBlZCBkb3duIHZlcnNpb246PC9kaXY+PERJVj4mbmJzcDs8L0RJ Vj48RElWPnBhY2thZ2Ugb3JnLndlYm1hY3JvLnV0aWw7PC9ESVY+PERJVj5wdWJsaWMgY2xhc3Mg RXZhbCB7PC9ESVY+PERJVj4mbmJzcDsgcHVibGljIHN0YXRpYyBPYmplY3QgZXZhbChPYmplY3Qg byl7IHJldHVybiBvOyB9PC9ESVY+PERJVj59PC9ESVY+PERJVj4mbmJzcDs8L0RJVj48RElWPklu IFdlYk1hY3JvLnByb3BlcnRpZXMgSSBhZGRlZDo8L0RJVj48RElWPiZuYnNwOzwvRElWPjxESVY+ RnVuY3Rpb25zLmV2YWw6IG9yZy53ZWJtYWNyby51dGlsLkV2YWwuZXZhbDwvRElWPjxESVY+Jm5i c3A7PC9ESVY+PERJVj5BbmQgdGhlbiBpbiBhIHRlbXBsYXRlIEkgd3JvdGU6PC9ESVY+PERJVj4m bmJzcDs8L0RJVj48RElWPiNzZXQgJHg9OTk8QlI+XCRldmFsKFwkeCArIDEpPSRldmFsKCR4ICsx KTxCUj4mbHQ7YnImZ3Q7PEJSPlwkZXZhbCgxKjIqMyo0KjUpPSRldmFsKDEqMiozKjQqNSk8L0RJ Vj48RElWPiZuYnNwOzwvRElWPjxESVY+YW5kIGdvdDo8L0RJVj48RElWPiZuYnNwOzwvRElWPjxE SVY+JGV2YWwoJHggKyAxKT0xMDAgPEJSPiRldmFsKDEqMiozKjQqNSk9MTIwIDwvRElWPjxESVY+ Jm5ic3A7PC9ESVY+PERJVj5JcyB0aGlzIHdvcnRoeSBvZiBpbmNsdXNpb24gaW4gdGhlIGNvcmU/ PC9ESVY+PERJVj4mbmJzcDs8L0RJVj48RElWPktlYXRzPC9ESVY+PERJVj4mbmJzcDs8L0RJVj48 RElWPiZuYnNwOzwvRElWPjwvRk9OVD4= |
From: Marc P. <ma...@an...> - 2003-05-05 22:14:35
|
Hi, Could we make the loop "current value" var in #foreach "disappear" from the context after the #foreach block completes - just as in java an inline var declaration in for() will? It seems silly that they hang around after the directive completes, and it can lead to confusing errors when editing lots of included templates. Some people may be taking advantage of this feature and any changes would break it - but a setting in WebMacro.properties could deal with that. Could we be more clever though? i.e: #set $mycounter = "" #foreach $mycounter in $list ... #end In the above case #foreach could detect that mycounter exists and leave it "as is" when the loop exits. In the following case: #foreach $mycounter in $list ... #end ...as the var is not previously in the context, #foreach could add it as it does now, but then remove it when the block ends. Thoughts? -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: <Kea...@di...> - 2003-05-05 14:09:10
|
Hmmm ... it seems like there ought to be a nice syntax for this, but I can't think of one off hand. Probably the cleanest solution without modifying the parser is to use a function, like $eval() or $out(). public class Eval { private Eval(){} public static String eval(Object o){ return String.valueOf(o); } } ... context.addGlobalFunction("eval", Eval.class, "eval"); ... $eval($x + 1) Keats Marc Palmer <ma...@an...> Sent by: web...@li... 05/03/2003 07:26 PM Please respond to marc To: web...@li... cc: Subject: [Webmacro-devel] An idea for simple new directive Guys, Do we have an elegant solution for evaluating a WM expression inline? i.e. I wanted to write this: There are $sessionCount-1 other people currently viewing this site. - and of course this doesn't work, I didn't think it would. However $(sessionCount-1) doesn't work either. Should it? That might be a nice solution to the problem. The traditional workaround is to #set the value to temporary variable and expand that. However, if $(expr) is not possible or desirable, how about a new directive: There are #eval ($sessionCount-1) other people currently viewing this site. - in terms of current whitespace handling this is a bit ugly, but it has a certain elegance. Remember, I'm after simple elegant solutions, not unintuitive #set or #setblock hacks :-) Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webmacro-devel mailing list Web...@li... https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Marc P. <ma...@an...> - 2003-05-03 23:24:26
|
Guys, Do we have an elegant solution for evaluating a WM expression inline? i.e. I wanted to write this: There are $sessionCount-1 other people currently viewing this site. - and of course this doesn't work, I didn't think it would. However $(sessionCount-1) doesn't work either. Should it? That might be a nice solution to the problem. The traditional workaround is to #set the value to temporary variable and expand that. However, if $(expr) is not possible or desirable, how about a new directive: There are #eval ($sessionCount-1) other people currently viewing this site. - in terms of current whitespace handling this is a bit ugly, but it has a certain elegance. Remember, I'm after simple elegant solutions, not unintuitive #set or #setblock hacks :-) Marc -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |
From: Eric B. R. <eb...@tc...> - 2003-05-02 16:20:16
|
I made a #cache directive that's in /contrib. It allows you to cache parts of a template (or the entire thing). The cache is per Broker, and there are static methods in the CacheDirective class that let you iterate over the cache, clear it, and other things. #cache "SomeKeyName" { #foreach $foo in $Foos { <li>$foo } } The #cache'd block gets output in-line where it is defined, but once it is cached you can "paste" it into another part of the template (or another template), so you can use it to "copy-n-paste" blocks of stuff: #cache "SomeKeyName" {} Can also use it to cache things per user too, just by defining a key name that's unique for the user: #cache "SomeKeyName-$User.Name" { ... } eric On Friday, May 2, 2003, at 10:46 AM, Marc Palmer wrote: > > Hi, > > I seem to remember some time ago that FastWriter was added to provide > caching of template output on a per-character-encoding basis. I assume > this is for the build-time textual output parts. Maybe I'm completely > wrong. > > Anyway, is there a "cache a stream by encoding" mechanism in WM that I > can reuse? > > You see, I just thought - though maybe this is not a new idea - that > using #attribute/#param we can have templates indicate whether they > are "static" or not. > > The servlet (or other code) processing the "top-level" template can > check this template parameter before rendering, and if it is "true" > not render at all, but return the entire output from a cache that > stores the output by character encoding (for each template). > > I am sure this would give a good performance boost for the WM portions > of a site that are basically static but still use variables, helpers > and includes to build their content. It bypasses the entire evaluation > stage. > > This is far more attractive than creating static "offline" copies of > output which greatly complicates sitebuilding where you have both > "static" and dynamic WM content. > > It's also more attractive than setting up a client-facing selective > HTTP proxy. All you'd need is to add the line: > > #attribute $static = true > > Anyone done any work on this? I'd like to include functionality like > this in the WM webapp. I think the best way to go would be to have one > cache per charset encoding, and each cache has entries for templates > by name. it should be quite easy to implement using Lane's cache. > > Marc > > -- > Marc Palmer > Wangjammer5 > http://www.wangjammers.org > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Webmacro-devel mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-devel |
From: Lane S. <la...@op...> - 2003-05-02 15:20:22
|
I have done something like this before. It is really easy to do. And, it improves performance dramatically. Cache encodedCaches = CacheFactory.create(); encodedCaches.put(encodingSet.toString() + requestURL.toString(), evaluatedTemplate); makes it possible to avoid a cache of caches where the inner cache is specific to an encoding. -Lane Marc Palmer wrote: > > Hi, > > I seem to remember some time ago that FastWriter was added to provide > caching of template output on a per-character-encoding basis. I assume > this is for the build-time textual output parts. Maybe I'm completely > wrong. > > Anyway, is there a "cache a stream by encoding" mechanism in WM that I > can reuse? > > You see, I just thought - though maybe this is not a new idea - that > using #attribute/#param we can have templates indicate whether they > are "static" or not. > > The servlet (or other code) processing the "top-level" template can > check this template parameter before rendering, and if it is "true" > not render at all, but return the entire output from a cache that > stores the output by character encoding (for each template). > > I am sure this would give a good performance boost for the WM portions > of a site that are basically static but still use variables, helpers > and includes to build their content. It bypasses the entire evaluation > stage. > > This is far more attractive than creating static "offline" copies of > output which greatly complicates sitebuilding where you have both > "static" and dynamic WM content. > > It's also more attractive than setting up a client-facing selective > HTTP proxy. All you'd need is to add the line: > > #attribute $static = true > > Anyone done any work on this? I'd like to include functionality like > this in the WM webapp. I think the best way to go would be to have one > cache per charset encoding, and each cache has entries for templates > by name. it should be quite easy to implement using Lane's cache. > > Marc > |
From: Marc P. <wj...@wa...> - 2003-05-02 14:47:11
|
Hi, I seem to remember some time ago that FastWriter was added to provide caching of template output on a per-character-encoding basis. I assume this is for the build-time textual output parts. Maybe I'm completely wrong. Anyway, is there a "cache a stream by encoding" mechanism in WM that I can reuse? You see, I just thought - though maybe this is not a new idea - that using #attribute/#param we can have templates indicate whether they are "static" or not. The servlet (or other code) processing the "top-level" template can check this template parameter before rendering, and if it is "true" not render at all, but return the entire output from a cache that stores the output by character encoding (for each template). I am sure this would give a good performance boost for the WM portions of a site that are basically static but still use variables, helpers and includes to build their content. It bypasses the entire evaluation stage. This is far more attractive than creating static "offline" copies of output which greatly complicates sitebuilding where you have both "static" and dynamic WM content. It's also more attractive than setting up a client-facing selective HTTP proxy. All you'd need is to add the line: #attribute $static = true Anyone done any work on this? I'd like to include functionality like this in the WM webapp. I think the best way to go would be to have one cache per charset encoding, and each cache has entries for templates by name. it should be quite easy to implement using Lane's cache. Marc -- Marc Palmer Wangjammer5 http://www.wangjammers.org |
From: Marc P. <ma...@an...> - 2003-05-02 12:10:27
|
On Thu, 01 May 2003 23:41:26 +0100, Marc Palmer <ma...@an...> wrote: > What a mess... anybody know how to get mod_jk2 working on Win32 with > Apache 2.0.45 and Tomcat 4.1? I can't even get apache to load the mod_jk2 > module... that is AFTER I've managed find it amongst all the detritus on > the ASF site. I've done it now. Finally found a mod_jk2.dll that worked on ASF. How? By using google not the apache site. -- Marc Palmer (Wangjammer5) http://www.wangjammers.org Java Consultants |