You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
(68) |
Dec
(77) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(75) |
Feb
(84) |
Mar
(89) |
Apr
(96) |
May
(52) |
Jun
(73) |
Jul
(99) |
Aug
(46) |
Sep
(40) |
Oct
(46) |
Nov
(45) |
Dec
(25) |
2004 |
Jan
(13) |
Feb
(74) |
Mar
(40) |
Apr
(18) |
May
(31) |
Jun
(1) |
Jul
(16) |
Aug
(1) |
Sep
(21) |
Oct
(19) |
Nov
(10) |
Dec
(16) |
2005 |
Jan
(4) |
Feb
(12) |
Mar
(46) |
Apr
(33) |
May
(64) |
Jun
(1) |
Jul
(60) |
Aug
(31) |
Sep
(26) |
Oct
(24) |
Nov
(37) |
Dec
(10) |
2006 |
Jan
(3) |
Feb
(31) |
Mar
(122) |
Apr
(22) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(8) |
Nov
(3) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(8) |
From: Lane S. <la...@op...> - 2005-03-11 18:30:36
|
why don't you go ahead and do this implementation? -Lane Keats Kirsch wrote: > Continuing the conversation with myself ... > > Another interesting option would be to change the #eval directive to > work with Strings as well as Macros. (I would automatically convert > the String to a StringMacro). This would be a simple change. The > only downside is that it might make it a bit harder to catch some errors. > > Then you could simply say: > > #eval $content.Data using { "contextData": $someData } > > This is kind of cool. You could even do stuff like: > > #eval "Hello, $userName" using { "userName": $User.Name } > > Keats > > Keats Kirsch wrote: > >> Looking back at the old TemplateTool code, it does what you want, but >> not in a particularly elegant way: >> >> #set $m = $Template.fromString($content.Data) >> $m.eval({ "contextData": $someData }) >> >> For some reason the MacroTemplate class doesn't implement the Macro >> interface. This would be a simple change that would allow you to say: >> >> #set $m = $Template.fromString($content.Data) >> #eval $m using { "contextData": $someData } >> >> I could make this change if anyone is interested. >> >> Keats >> >> Marc Palmer wrote: >> >>> Hi, >>> >>> Long time no speak! >>> >>> I finally got around to getting 2.0b1 (only a year late!) and am >>> working on the start of CMS using WM. >>> >>> I wonder if I'm being really stupid, but I want some of the content, >>> which is pulled in from String data, to be treated as a WM template. >>> >>> So given a content string loaded from the CMS, say "<p>Hello, >>> $name</p>", I want to use this in my page, a template itself, but >>> have $name evaluate. i.e. something like this in the main CMS >>> rendering template: >>> >>> <div> >>> #eval $content.Data using { "contextData": $someData } >>> </div> >>> >>> ...but eval only works with Macro objects to my knowledge. >>> >>> Does anybody know how I can do this? I effectively want the same as >>> #include but from a String instead of a file. >>> >>> I've tried: >>> >>> <div> >>> #templet $block >>> $content.Data >>> #end >>> #eval $block using { "contextData": $someData } >>> </div> >>> >>> ...but of course this is not correct as $content.Data is not >>> evaluated at the time the templet is defined. I also tried #setblock >>> as macro etc. >>> >>> It's a bit confusing. I'd like to not have to write a >>> helper/directive to load a Macro tempalte from a String unless I >>> have to... >>> >>> Thanks in advance. >>> > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: Keats K. <ke...@xa...> - 2005-03-11 18:16:15
|
Continuing the conversation with myself ... Another interesting option would be to change the #eval directive to work with Strings as well as Macros. (I would automatically convert the String to a StringMacro). This would be a simple change. The only downside is that it might make it a bit harder to catch some errors. Then you could simply say: #eval $content.Data using { "contextData": $someData } This is kind of cool. You could even do stuff like: #eval "Hello, $userName" using { "userName": $User.Name } Keats Keats Kirsch wrote: > Looking back at the old TemplateTool code, it does what you want, but > not in a particularly elegant way: > > #set $m = $Template.fromString($content.Data) > $m.eval({ "contextData": $someData }) > > For some reason the MacroTemplate class doesn't implement the Macro > interface. This would be a simple change that would allow you to say: > > #set $m = $Template.fromString($content.Data) > #eval $m using { "contextData": $someData } > > I could make this change if anyone is interested. > > Keats > > Marc Palmer wrote: > >> Hi, >> >> Long time no speak! >> >> I finally got around to getting 2.0b1 (only a year late!) and am >> working on the start of CMS using WM. >> >> I wonder if I'm being really stupid, but I want some of the content, >> which is pulled in from String data, to be treated as a WM template. >> >> So given a content string loaded from the CMS, say "<p>Hello, >> $name</p>", I want to use this in my page, a template itself, but >> have $name evaluate. i.e. something like this in the main CMS >> rendering template: >> >> <div> >> #eval $content.Data using { "contextData": $someData } >> </div> >> >> ...but eval only works with Macro objects to my knowledge. >> >> Does anybody know how I can do this? I effectively want the same as >> #include but from a String instead of a file. >> >> I've tried: >> >> <div> >> #templet $block >> $content.Data >> #end >> #eval $block using { "contextData": $someData } >> </div> >> >> ...but of course this is not correct as $content.Data is not >> evaluated at the time the templet is defined. I also tried #setblock >> as macro etc. >> >> It's a bit confusing. I'd like to not have to write a >> helper/directive to load a Macro tempalte from a String unless I have >> to... >> >> Thanks in advance. >> |
From: Keats K. <ke...@xa...> - 2005-03-11 17:53:22
|
Looking back at the old TemplateTool code, it does what you want, but not in a particularly elegant way: #set $m = $Template.fromString($content.Data) $m.eval({ "contextData": $someData }) For some reason the MacroTemplate class doesn't implement the Macro interface. This would be a simple change that would allow you to say: #set $m = $Template.fromString($content.Data) #eval $m using { "contextData": $someData } I could make this change if anyone is interested. Keats Marc Palmer wrote: > Hi, > > Long time no speak! > > I finally got around to getting 2.0b1 (only a year late!) and am > working on the start of CMS using WM. > > I wonder if I'm being really stupid, but I want some of the content, > which is pulled in from String data, to be treated as a WM template. > > So given a content string loaded from the CMS, say "<p>Hello, > $name</p>", I want to use this in my page, a template itself, but have > $name evaluate. i.e. something like this in the main CMS rendering > template: > > <div> > #eval $content.Data using { "contextData": $someData } > </div> > > ...but eval only works with Macro objects to my knowledge. > > Does anybody know how I can do this? I effectively want the same as > #include but from a String instead of a file. > > I've tried: > > <div> > #templet $block > $content.Data > #end > #eval $block using { "contextData": $someData } > </div> > > ...but of course this is not correct as $content.Data is not evaluated > at the time the templet is defined. I also tried #setblock as macro etc. > > It's a bit confusing. I'd like to not have to write a helper/directive > to load a Macro tempalte from a String unless I have to... > > Thanks in advance. > |
From: Keats K. <ke...@xa...> - 2005-03-11 16:45:28
|
Looking at the test case in CVS ( http://cvs.sourceforge.net/viewcvs.py/webmacro/webmacro/test/unit/org/webmacro/template/TestEvalTemplet.java?rev=1.1&view=markup) I see that I created a convenience class for doing this during testing: //** Convenience class to evaluate a string template as a Macro *// *public* *class* StringMacro *implements* org.webmacro.Macro { *private* String s = *""*; *public* StringMacro(String text) { s = text; } *public* Object evaluate(Context context) *throws* org.webmacro.PropertyException { org.webmacro.engine.StringTemplate t = *new* org.webmacro.engine.StringTemplate(context.getBroker(), s); *return* t.evaluateAsString(context); } *public* *void* write(org.webmacro.FastWriter fw, Context context) { } } This let's you use arbitrary strings as macros, e.g., StringMacro m = *new* StringMacro(*"$A $B $C"*); I think the $Template tool can be used similarly. Keats Keats Kirsch wrote: > It's been a long time, but I'm fairly certain you can do this with the > #templet/#eval mechanism. I'll try to dredge up my memories of how it > works. There is also a $template tool that can do this: > org.webmacro.servlet.TemplateTool. > > Keats > > Marc Palmer wrote: > >> Alex Twisleton-Wykeham-Fiennes wrote: >> >>> On Friday 11 March 2005 15:57, Marc Palmer wrote: >>> >>>>> Two questions:- >>>>> >>>>> 1. what package did you put your StringTemplateLoader class into? >>>> >>>> >>>> >>>> package org.webmacro.resource; >>> >>> >>> >>> >>> OK. maybe put the following into your StringTemplateLoader:- >> >> >> >> Yep it is loading, and setConfig gets called. >> >> However load() is never called. >> >> More info - my content in the previous example was empty. I changed >> the template to do this: >> >> >> #include as template "string:testing" >> >> And the error is: >> >> 16:15:38 resource WARNING BrokerTemplateProvider: Template >> not found: string:testing >> org.webmacro.ignition.cms.ViewEngineException: >> org.webmacro.PropertyException: #include string:testing: Not found by >> template provider >> >> So for some reason the string: handler is being overlooked and its >> just using the Broker which of course fails. >> >> DelegatingTemplateProvider.load is not being called either. Odd. >> >> Src: >> >> public class StringTemplateLoader extends AbstractTemplateLoader >> { >> public final static String PROTOCOL = "string:"; >> >> public void setConfig(String config) >> { >> } >> >> public Template load(String query, >> CacheElement ce) >> throws ResourceException >> { >> if (!query.startsWith(PROTOCOL)) >> { >> return null; >> } >> return new StringTemplate(broker, >> query.substring(PROTOCOL.length())); >> } >> } >> >> Cheers >> >> > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 16:33:43
|
On Friday 11 March 2005 16:21, Marc Palmer wrote: > Alex Twisleton-Wykeham-Fiennes wrote: > > On Friday 11 March 2005 15:57, Marc Palmer wrote: > >>>Two questions:- > >>> > >>>1. what package did you put your StringTemplateLoader class into? > >> > >>package org.webmacro.resource; > > > > OK. maybe put the following into your StringTemplateLoader:- > > Yep it is loading, and setConfig gets called. > > However load() is never called. very odd. > More info - my content in the previous example was empty. I changed the > template to do this: > > > #include as template "string:testing" > > And the error is: > > 16:15:38 resource WARNING BrokerTemplateProvider: Template not found: > string:testing > org.webmacro.ignition.cms.ViewEngineException: > org.webmacro.PropertyException: #include string:testing: Not found by > template provider > > So for some reason the string: handler is being overlooked and its just > using the Broker which of course fails. > > DelegatingTemplateProvider.load is not being called either. Odd. if DelegatingTemplateProvider.load isn't being invoked then I wouldn't expect the StringTemplateProvider to be invoked as the BrokerTemplateProvider will not know about it. Maybe it is something to do with the BrokerTemplateProvider being a little bit aggressive and messing with DelegatingTemplateProvider? It looks like it has actually replaced DelegatingTemplateProvider as the Provider for the system (which might be a bug). Can you try using a different implementation of TemplateLoader other than "broker" as your secondary loader and see if that makes any difference? Alex |
From: Keats K. <ke...@xa...> - 2005-03-11 16:28:47
|
It's been a long time, but I'm fairly certain you can do this with the #templet/#eval mechanism. I'll try to dredge up my memories of how it works. There is also a $template tool that can do this: org.webmacro.servlet.TemplateTool. Keats Marc Palmer wrote: > Alex Twisleton-Wykeham-Fiennes wrote: > >> On Friday 11 March 2005 15:57, Marc Palmer wrote: >> >>>> Two questions:- >>>> >>>> 1. what package did you put your StringTemplateLoader class into? >>> >>> >>> package org.webmacro.resource; >> >> >> >> OK. maybe put the following into your StringTemplateLoader:- > > > Yep it is loading, and setConfig gets called. > > However load() is never called. > > More info - my content in the previous example was empty. I changed > the template to do this: > > > #include as template "string:testing" > > And the error is: > > 16:15:38 resource WARNING BrokerTemplateProvider: Template > not found: string:testing > org.webmacro.ignition.cms.ViewEngineException: > org.webmacro.PropertyException: #include string:testing: Not found by > template provider > > So for some reason the string: handler is being overlooked and its > just using the Broker which of course fails. > > DelegatingTemplateProvider.load is not being called either. Odd. > > Src: > > public class StringTemplateLoader extends AbstractTemplateLoader > { > public final static String PROTOCOL = "string:"; > > public void setConfig(String config) > { > } > > public Template load(String query, > CacheElement ce) > throws ResourceException > { > if (!query.startsWith(PROTOCOL)) > { > return null; > } > return new StringTemplate(broker, > query.substring(PROTOCOL.length())); > } > } > > Cheers > > |
From: Marc P. <ma...@an...> - 2005-03-11 16:26:19
|
Argh no! Don't worry... I've just worked out the problem. This is not normal template processing code... the setup code does some funny stuff to the template provider ;-( So the template provider assignment in wm properties is being overridden. Duh. Thanks for you help, I'm sure it'll be working soon now. :) -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Marc P. <ma...@an...> - 2005-03-11 16:22:12
|
Alex Twisleton-Wykeham-Fiennes wrote: > On Friday 11 March 2005 15:57, Marc Palmer wrote: > >>>Two questions:- >>> >>>1. what package did you put your StringTemplateLoader class into? >> >>package org.webmacro.resource; > > > OK. maybe put the following into your StringTemplateLoader:- Yep it is loading, and setConfig gets called. However load() is never called. More info - my content in the previous example was empty. I changed the template to do this: #include as template "string:testing" And the error is: 16:15:38 resource WARNING BrokerTemplateProvider: Template not found: string:testing org.webmacro.ignition.cms.ViewEngineException: org.webmacro.PropertyException: #include string:testing: Not found by template provider So for some reason the string: handler is being overlooked and its just using the Broker which of course fails. DelegatingTemplateProvider.load is not being called either. Odd. Src: public class StringTemplateLoader extends AbstractTemplateLoader { public final static String PROTOCOL = "string:"; public void setConfig(String config) { } public Template load(String query, CacheElement ce) throws ResourceException { if (!query.startsWith(PROTOCOL)) { return null; } return new StringTemplate(broker, query.substring(PROTOCOL.length())); } } Cheers -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 16:11:11
|
On Friday 11 March 2005 15:57, Marc Palmer wrote: > > Two questions:- > > > > 1. what package did you put your StringTemplateLoader class into? > > package org.webmacro.resource; OK. maybe put the following into your StringTemplateLoader:- static { System.err.println("StringTemplateLoader booting up"); } which will tell you whether or not the class is being loaded from the WebMacro.properties file. <snip> > > 2. what was in the WebMacro template that threw the error? > > #include "pagebegin.wm" > <p> > #foreach $contentItem in $content > #if ($contentItem.View) > #include "views/$(contentItem.View).wm" > #else > #if ($contentItem.ContentType = "text/html") > <div> > <h1>$contentItem.Description</h1> > #include as template "string:$contentItem.Data" > </div> > #end > #end > #end > </p> > #include "pageend.wm" > > The String returned by $contentItem.Data is the text to use as the > template, i.e. "<p>Hello, $name</p>" This all looks fine as far as I can see. Try sticking a debug message in the load method of the StringTemplateLoader to see whether or not it is actually getting invoked. Can you mail me the source to your StringTemplateLoader off list and I'll run it besides my EvaluatingTemplateProvider and see if they behave differently... Alex |
From: Marc P. <ma...@an...> - 2005-03-11 16:03:24
|
Alex Twisleton-Wykeham-Fiennes wrote: > On Friday 11 March 2005 15:43, Marc Palmer wrote: > >>Alex Twisleton-Wykeham-Fiennes wrote: >> >>>Last message (promise) :-) >>> >>>Here is a more efficient implementation:- >> >>Thanks for this. I'm trying it out now but not having any luck, I get: >> >>15:38:43 resource WARNING BrokerTemplateProvider: Template not found: >>string: I notice the apparent source of the problem is BrokerTemplateProvider, which implies that DelegatingTemplateProvider is not handling it, or has and gave up. Hmmm -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Marc P. <ma...@an...> - 2005-03-11 16:01:20
|
Again, I'm a year later but I remember the heated discussion on the changes to ContextTool mechanisms :) I finally got around to using it today. Nice work, Brian. I was frustrated that I could not just get ordinary objects into the context using WM config... until I rediscovered the ContextAutoLoader stuff :) Thanks for the hard work. Cheers -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Marc P. <ma...@an...> - 2005-03-11 15:59:11
|
> > Two questions:- > > 1. what package did you put your StringTemplateLoader class into? package org.webmacro.resource; ...I have an orthogonal source tree for my framework WebMacro Ignition, which was/will probably still be open source and this stuff is in the non-Ignition specific packages of stuff that will work with WM standalone... > 2. what was in the WebMacro template that threw the error? #include "pagebegin.wm" <p> #foreach $contentItem in $content #if ($contentItem.View) #include "views/$(contentItem.View).wm" #else #if ($contentItem.ContentType = "text/html") <div> <h1>$contentItem.Description</h1> #include as template "string:$contentItem.Data" </div> #end #end #end </p> #include "pageend.wm" The String returned by $contentItem.Data is the text to use as the template, i.e. "<p>Hello, $name</p>" Cheers -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 15:52:08
|
On Friday 11 March 2005 15:43, Marc Palmer wrote: > Alex Twisleton-Wykeham-Fiennes wrote: > > Last message (promise) :-) > > > > Here is a more efficient implementation:- > > Thanks for this. I'm trying it out now but not having any luck, I get: > > 15:38:43 resource WARNING BrokerTemplateProvider: Template not found: > string: > My webmacro.properties has: > > TemplateLoader.string=org.webmacro.resource.StringTemplateLoader > > Providers.template=org.webmacro.resource.DelegatingTemplateProvider > > TemplateLoaderPath.1=string: > TemplateLoaderPath.2=broker: > > Is this correct? I've used your code verbatim apart from I called it > StringTemplateLoader and made the protocol "string:" > > Cheers for the help! Two questions:- 1. what package did you put your StringTemplateLoader class into? 2. what was in the WebMacro template that threw the error? Alex |
From: Marc P. <ma...@an...> - 2005-03-11 15:44:36
|
Alex Twisleton-Wykeham-Fiennes wrote: > Last message (promise) :-) > > Here is a more efficient implementation:- Thanks for this. I'm trying it out now but not having any luck, I get: 15:38:43 resource WARNING BrokerTemplateProvider: Template not found: string: My webmacro.properties has: TemplateLoader.string=org.webmacro.resource.StringTemplateLoader Providers.template=org.webmacro.resource.DelegatingTemplateProvider TemplateLoaderPath.1=string: TemplateLoaderPath.2=broker: Is this correct? I've used your code verbatim apart from I called it StringTemplateLoader and made the protocol "string:" Cheers for the help! -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 14:36:05
|
All, a question this time: If I want to extend my EvaluatingTemplateLoader to play nice with the caching construct then I am a little bit confused about the logic of the CacheReloadContext. If I have the following code:- package org.cord.node; import org.webmacro.*; import org.webmacro.engine.*; import org.webmacro.resource.*; public class EvaluatingTemplateLoader extends AbstractTemplateLoader { public final static String PROTOCOL = "evaluate:"; public void setConfig(String config) { } public Template load(String query, CacheElement ce) throws ResourceException { if (! query.startsWith(PROTOCOL)) { return null; } ce.setReloadContext(new CacheReloadContext() { public boolean shouldReload() { return false; } }); return new StringTemplate(broker, query.substring(PROTOCOL.length())); } } then does that mean for a given value of query (which in this case actually holds the evaluatable content of the template) that the CacheManager will not invoke load(query,ce) on the EvaluatingTemplateLoader after the initial request? If this is the case, then will the CacheManager expire the mapping of query:StringTemplate after some time (based around the implementation of CacheManager) or does it mean that it will try and hold onto it forever, thereby polluting the cache space? My gut reaction is that the above is correct because the CacheReloadContext appears to relate to whether or not the relationship between query & resolvedQueryContent has changed, which in this case is guaranteed never to happen. Thanks for you help Alex |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 14:20:54
|
Last message (promise) :-) Here is a more efficient implementation:- package org.cord.node; import org.webmacro.*; import org.webmacro.engine.*; import org.webmacro.resource.*; public class EvaluatingTemplateLoader extends AbstractTemplateLoader { public final static String PROTOCOL = "evaluate:"; public void setConfig(String config) { } public Template load(String query, CacheElement ce) throws ResourceException { if (! query.startsWith(PROTOCOL)) { return null; } return new StringTemplate(broker, query.substring(PROTOCOL.length())); } } TemplateLoaderPath.1=evaluate: TemplateLoader.evaluate=org.cord.node.EvaluatingTemplateLoader #include as template "evaluate:<p>Hello, \$name</p>" This will now get invoked first of all out of the chain of TemplateLoaders and will rapidly discard any request that doesn't start with "evaluate:" thereby grabbing any requests as possible. The advantage with this is that the contents of the string that you are going to evaluate are going to change across a wide range of values. If the EvaluatingTemplateLoader is the last in the chain then all your default template loaders are going to have to scan their sources for each of your dynamic templates which will end up being very expensive. Hope this helps Alex |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 14:14:09
|
On Friday 11 March 2005 13:41, Alex Twisleton-Wykeham-Fiennes wrote: <Snip> > > It's a bit confusing. I'd like to not have to write a helper/directive > > to load a Macro tempalte from a String unless I have to... > > Would it not be possible to have an implementation of TemplateProvider that > used the name of the template as the contents of the template itself? > > This would let you say:- > > #include as template "<p>Hello, $name</p>" > > or > > #include as template "$templateSource" > > Of course, this would rather cripple your normal template loading, so there > could be a switch which looked for a given header such as:- > > #include as template "evaluate:$templateSource" > > and if it didn't start with "evaluate:" then it would just delegate the > request to the default template loader. Actually I was a bit wrong. What you want is a TemplateLoader. Here is proof of concept:- package org.cord.node; import org.webmacro.*; import org.webmacro.engine.*; import org.webmacro.resource.*; public class EvaluatingTemplateLoader extends AbstractTemplateLoader { public void setConfig(String config) { } public Template load(String query, CacheElement ce) throws ResourceException { return new StringTemplate(broker, query); } } Then put this in your template evaluater:- TemplateLoaderPath.n=evaluate: TemplateLoader.evaluate=org.cord.node.EvaluatingTemplateLoader where n is higher than any other TemplateLoaderPath to ensure that it doesn't jump on other templates. and then you can do:- #include as template "<p>Hello, \$name</p>" note that the escape of the $ in the passed template is necessary to prevent it getting prematurely evaluated... You can now do the same thing off variables like so:- #set $templateSource = "<p>Hello, \$name</p>" #include as template "$templateSource" and this all works fine... Alex ps thought that it would be funky to be able to chain these like so:- #include as template "#include as text "<normalTemplatePath>"" but WebMacro obviously thinks that this is on crack... |
From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 13:39:07
|
On Friday 11 March 2005 13:16, Marc Palmer wrote: > Hi, > > Long time no speak! > > I finally got around to getting 2.0b1 (only a year late!) and am working > on the start of CMS using WM. > > I wonder if I'm being really stupid, but I want some of the content, > which is pulled in from String data, to be treated as a WM template. > > So given a content string loaded from the CMS, say "<p>Hello, > $name</p>", I want to use this in my page, a template itself, but have > $name evaluate. i.e. something like this in the main CMS rendering > template: > > <div> > #eval $content.Data using { "contextData": $someData } > </div> > > ...but eval only works with Macro objects to my knowledge. > > Does anybody know how I can do this? I effectively want the same as > #include but from a String instead of a file. > > I've tried: > > <div> > #templet $block > $content.Data > #end > #eval $block using { "contextData": $someData } > </div> > > ...but of course this is not correct as $content.Data is not evaluated > at the time the templet is defined. I also tried #setblock as macro etc. > > It's a bit confusing. I'd like to not have to write a helper/directive > to load a Macro tempalte from a String unless I have to... Would it not be possible to have an implementation of TemplateProvider that used the name of the template as the contents of the template itself? This would let you say:- #include as template "<p>Hello, $name</p>" or #include as template "$templateSource" Of course, this would rather cripple your normal template loading, so there could be a switch which looked for a given header such as:- #include as template "evaluate:$templateSource" and if it didn't start with "evaluate:" then it would just delegate the request to the default template loader. If this fixed your problem then it would be relatively easy to implement... Alex |
From: Marc P. <ma...@an...> - 2005-03-11 13:18:08
|
Hi, Long time no speak! I finally got around to getting 2.0b1 (only a year late!) and am working on the start of CMS using WM. I wonder if I'm being really stupid, but I want some of the content, which is pulled in from String data, to be treated as a WM template. So given a content string loaded from the CMS, say "<p>Hello, $name</p>", I want to use this in my page, a template itself, but have $name evaluate. i.e. something like this in the main CMS rendering template: <div> #eval $content.Data using { "contextData": $someData } </div> ...but eval only works with Macro objects to my knowledge. Does anybody know how I can do this? I effectively want the same as #include but from a String instead of a file. I've tried: <div> #templet $block $content.Data #end #eval $block using { "contextData": $someData } </div> ...but of course this is not correct as $content.Data is not evaluated at the time the templet is defined. I also tried #setblock as macro etc. It's a bit confusing. I'd like to not have to write a helper/directive to load a Macro tempalte from a String unless I have to... Thanks in advance. -- Marc Palmer - - - wj...@wa... Wangjammers, J2ME Developers ~ http://www.wangjammers.org/games/ Blog ~ http://www.jroller.com/page/Wangjammer5 |
From: Lane S. <la...@op...> - 2005-02-07 18:03:46
|
did this work, Marcel? -Lane Lane Sharman wrote: > Marcel, > > sorry to get back with you so late and not in real time. > > I think you need to look closely at the wiki.properties file towards > the top. For example, you can disable the authentication/approval > processing that is clearly on by default :). > > there you should see what the names and passwords are for admin use. > > you are using the cvs head which I spent some time on about a year ago. > > when I get home, I will look up the password if you do not find it in > the wiki.properties file. I have my laptop here... let me look. > > ok. here is deal (i pulled down the cvs image and refreshed my aging > mind): > > 1) Comment out lines 26, 27 and comment in 14, 15 in wiki.properties > (bounce the app) > this will make your site public. > run in this manner if you like. Be sure to create an account for admin > because that is the preferred admin login name identified in the props > file (line 94) > > 2) To run in private, authorized mode, undo (1) above. Use admin (or > any administrative account) to review new accounts and to authorize. > > let me know. > > -Lane > > marcel.huijkman wrote: > >> I've looked into pdf's readme's intall's but can't figure out how to >> be an admin. >> >> I've registered on my wiki, but my account has status: Approval Pending >> >> and can't log in with admin - 99ducks >> >> So once again (mighty savier), help me out.....(please) >> >> -marcello- >> >> Lane Sharman wrote: >> >>> Marcel, >>> >>> nullDeploy signfies indeed that you have not set a property when >>> doing the deployment from ant. when doing the ant deployment, it >>> takes a property, the absolute path, and prepends this to >>> deploy/.... I think it is called INSTALL_DIR or something like that. >>> >>> This is in the install docs and the pdf document in the distro. >>> >>> -Lane >>> >>> marcel.huijkman wrote: >>> >>>> Okay, but how about the error? >>>> >>>> I think it has something to do with the environment variable that >>>> can't be found by a pice of library code, >>>> which happens not to be included as a source. So I can't fix this >>>> myself. >>>> >>>> I've installed the wiki in c:/data/website_wiki >>>> >>>> and this is what wm.log shows me: >>>> >>>> 01-02-2005 17:35:55.484 wm NOTICE new >>>> WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 >>>> 01-02-2005 17:35:55.484 servlet ERROR WebMacro application >>>> code failed to initialize: >>>> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >>>> does not point to a file. >>>> This error is the result of a failure in the >>>> code supplied by the application programmer. >>>> >>>> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >>>> does not point to a file. >>>> at >>>> org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) >>>> >>>> at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) >>>> at javax.servlet.GenericServlet.init(GenericServlet.java:82) >>>> at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) >>>> at >>>> com.caucho.server.http.Application.createServlet(Application.java:3114) >>>> >>>> at >>>> com.caucho.server.http.Application.loadServlet(Application.java:3065) >>>> at >>>> com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) >>>> >>>> at >>>> com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) >>>> >>>> at >>>> com.caucho.server.http.Application.buildFilterChain(Application.java:2765) >>>> >>>> at com.caucho.server.http.Invocation.service(Invocation.java:313) >>>> at >>>> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) >>>> >>>> at >>>> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) >>>> at >>>> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) >>>> >>>> at com.caucho.server.TcpConnection.run(TcpConnection.java:139) >>>> at java.lang.Thread.run(Thread.java:595) >>>> 01-02-2005 17:35:55.484 servlet NOTICE started: >>>> org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f >>>> >>>> >>>> But the strange thing is, if I edit the value of the web.xml and >>>> point the a false place >>>> (where the wiki.propoerties file doesn't exist) it give another >>>> error. So my guess is that >>>> it can find the wiki.props file but there is a diverent routine for >>>> getting the content >>>> which handels the location of the porps file differently. >>>> (Wild guess.....) >>>> >>>> How can I quick fix this? >>>> >>>> I might be needing this wiki tomorrow at a big customer, and want >>>> to introduce a little webmacro >>>> while I'm at it. >>>> >>>> So step in and help me out....! >>>> (cry for help) >>>> >>>> -marcello- >>>> >>>> >>>> Lane Sharman wrote: >>>> >>>>> Hi, >>>>> >>>>> The head version of wiki is backward compatible. >>>>> >>>>> However, it has features for creating a private wiki. In short, >>>>> with the security property turned on (see wiki.properties), a user >>>>> cannot browse the web site until the administrator approves him to >>>>> do so. >>>>> >>>>> this was a constant complaint among corporate users of a wiki. >>>>> >>>>> -Lane >>>>> >>>>> marcel.huijkman wrote: >>>>> >>>>>> I'm trying to get the Wiki part going but it won't compile with >>>>>> java 1.5 >>>>>> So I've changed all the Enummeration enum parts and it compiles, >>>>>> build etc. >>>>>> >>>>>> However when I call my wiki: >>>>>> http://localhost/wiki/StartPage it says: >>>>>> >>>>>> WebMacro application code failed to initialize: >>>>>> javax.servlet.ServletException: >>>>>> java.lang.IllegalArgumentException: >>>>>> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >>>>>> This error is the result of a failure in the >>>>>> code supplied by the application programmer. >>>>>> >>>>>> Please contact the server administrator >>>>>> >>>>>> >>>>>> I think the part: nulldeploy says something isn't good. >>>>>> Any help is welcome. >>>>>> >>>>>> Also any hints on how to use wiki as a directive. (I've read >>>>>> somewhere that this is possible...) >>>>>> >>>>>> BTW how is version 3 of the wiki? >>>>>> >>>>>> >>>>>> ------------------------------------------------------- >>>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>>>> Reporting >>>>>> Tool for open source databases. Create drag-&-drop reports. Save >>>>>> time >>>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>>>> etc. >>>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>>>> _______________________________________________ >>>>>> Webmacro-user mailing list >>>>>> Web...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>>>> >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>>> Reporting >>>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>>> etc. >>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>>> _______________________________________________ >>>>> Webmacro-user mailing list >>>>> Web...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>>> >>>>> . >>>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> Webmacro-user mailing list >>>> Web...@li... >>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Webmacro-user mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >>> . >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > -- Lane Sharman Providing Private and SPAM-Free Email http://www.opendoors.com 858-755-2868 |
From: Lane S. <la...@op...> - 2005-02-04 03:32:19
|
Marcel, sorry to get back with you so late and not in real time. I think you need to look closely at the wiki.properties file towards the top. For example, you can disable the authentication/approval processing that is clearly on by default :). there you should see what the names and passwords are for admin use. you are using the cvs head which I spent some time on about a year ago. when I get home, I will look up the password if you do not find it in the wiki.properties file. I have my laptop here... let me look. ok. here is deal (i pulled down the cvs image and refreshed my aging mind): 1) Comment out lines 26, 27 and comment in 14, 15 in wiki.properties (bounce the app) this will make your site public. run in this manner if you like. Be sure to create an account for admin because that is the preferred admin login name identified in the props file (line 94) 2) To run in private, authorized mode, undo (1) above. Use admin (or any administrative account) to review new accounts and to authorize. let me know. -Lane marcel.huijkman wrote: > I've looked into pdf's readme's intall's but can't figure out how to > be an admin. > > I've registered on my wiki, but my account has status: Approval Pending > > and can't log in with admin - 99ducks > > So once again (mighty savier), help me out.....(please) > > -marcello- > > Lane Sharman wrote: > >> Marcel, >> >> nullDeploy signfies indeed that you have not set a property when >> doing the deployment from ant. when doing the ant deployment, it >> takes a property, the absolute path, and prepends this to deploy/.... >> I think it is called INSTALL_DIR or something like that. >> >> This is in the install docs and the pdf document in the distro. >> >> -Lane >> >> marcel.huijkman wrote: >> >>> Okay, but how about the error? >>> >>> I think it has something to do with the environment variable that >>> can't be found by a pice of library code, >>> which happens not to be included as a source. So I can't fix this >>> myself. >>> >>> I've installed the wiki in c:/data/website_wiki >>> >>> and this is what wm.log shows me: >>> >>> 01-02-2005 17:35:55.484 wm NOTICE new >>> WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 >>> 01-02-2005 17:35:55.484 servlet ERROR WebMacro application >>> code failed to initialize: >>> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >>> does not point to a file. >>> This error is the result of a failure in the >>> code supplied by the application programmer. >>> >>> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >>> does not point to a file. >>> at >>> org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) >>> at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) >>> at javax.servlet.GenericServlet.init(GenericServlet.java:82) >>> at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) >>> at >>> com.caucho.server.http.Application.createServlet(Application.java:3114) >>> at >>> com.caucho.server.http.Application.loadServlet(Application.java:3065) >>> at >>> com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) >>> >>> at >>> com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) >>> >>> at >>> com.caucho.server.http.Application.buildFilterChain(Application.java:2765) >>> >>> at com.caucho.server.http.Invocation.service(Invocation.java:313) >>> at >>> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) >>> >>> at >>> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) >>> at >>> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) >>> >>> at com.caucho.server.TcpConnection.run(TcpConnection.java:139) >>> at java.lang.Thread.run(Thread.java:595) >>> 01-02-2005 17:35:55.484 servlet NOTICE started: >>> org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f >>> >>> >>> But the strange thing is, if I edit the value of the web.xml and >>> point the a false place >>> (where the wiki.propoerties file doesn't exist) it give another >>> error. So my guess is that >>> it can find the wiki.props file but there is a diverent routine for >>> getting the content >>> which handels the location of the porps file differently. >>> (Wild guess.....) >>> >>> How can I quick fix this? >>> >>> I might be needing this wiki tomorrow at a big customer, and want to >>> introduce a little webmacro >>> while I'm at it. >>> >>> So step in and help me out....! >>> (cry for help) >>> >>> -marcello- >>> >>> >>> Lane Sharman wrote: >>> >>>> Hi, >>>> >>>> The head version of wiki is backward compatible. >>>> >>>> However, it has features for creating a private wiki. In short, >>>> with the security property turned on (see wiki.properties), a user >>>> cannot browse the web site until the administrator approves him to >>>> do so. >>>> >>>> this was a constant complaint among corporate users of a wiki. >>>> >>>> -Lane >>>> >>>> marcel.huijkman wrote: >>>> >>>>> I'm trying to get the Wiki part going but it won't compile with >>>>> java 1.5 >>>>> So I've changed all the Enummeration enum parts and it compiles, >>>>> build etc. >>>>> >>>>> However when I call my wiki: >>>>> http://localhost/wiki/StartPage it says: >>>>> >>>>> WebMacro application code failed to initialize: >>>>> javax.servlet.ServletException: >>>>> java.lang.IllegalArgumentException: >>>>> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >>>>> This error is the result of a failure in the >>>>> code supplied by the application programmer. >>>>> >>>>> Please contact the server administrator >>>>> >>>>> >>>>> I think the part: nulldeploy says something isn't good. >>>>> Any help is welcome. >>>>> >>>>> Also any hints on how to use wiki as a directive. (I've read >>>>> somewhere that this is possible...) >>>>> >>>>> BTW how is version 3 of the wiki? >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>>> Reporting >>>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, >>>>> etc. >>>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>>> _______________________________________________ >>>>> Webmacro-user mailing list >>>>> Web...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> Webmacro-user mailing list >>>> Web...@li... >>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>> >>>> . >>>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Webmacro-user mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> >> . >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: marcel.huijkman <mar...@ra...> - 2005-02-02 08:02:54
|
I've looked into pdf's readme's intall's but can't figure out how to be an admin. I've registered on my wiki, but my account has status: Approval Pending and can't log in with admin - 99ducks So once again (mighty savier), help me out.....(please) -marcello- Lane Sharman wrote: > Marcel, > > nullDeploy signfies indeed that you have not set a property when doing > the deployment from ant. when doing the ant deployment, it takes a > property, the absolute path, and prepends this to deploy/.... I think > it is called INSTALL_DIR or something like that. > > This is in the install docs and the pdf document in the distro. > > -Lane > > marcel.huijkman wrote: > >> Okay, but how about the error? >> >> I think it has something to do with the environment variable that >> can't be found by a pice of library code, >> which happens not to be included as a source. So I can't fix this >> myself. >> >> I've installed the wiki in c:/data/website_wiki >> >> and this is what wm.log shows me: >> >> 01-02-2005 17:35:55.484 wm NOTICE new >> WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 >> 01-02-2005 17:35:55.484 servlet ERROR WebMacro application >> code failed to initialize: >> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >> does not point to a file. >> This error is the result of a failure in the >> code supplied by the application programmer. >> >> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >> does not point to a file. >> at >> org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) >> at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) >> at javax.servlet.GenericServlet.init(GenericServlet.java:82) >> at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) >> at >> com.caucho.server.http.Application.createServlet(Application.java:3114) >> at >> com.caucho.server.http.Application.loadServlet(Application.java:3065) >> at >> com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) >> >> at >> com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) >> >> at >> com.caucho.server.http.Application.buildFilterChain(Application.java:2765) >> >> at com.caucho.server.http.Invocation.service(Invocation.java:313) >> at >> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) >> at >> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) >> at >> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) >> >> at com.caucho.server.TcpConnection.run(TcpConnection.java:139) >> at java.lang.Thread.run(Thread.java:595) >> 01-02-2005 17:35:55.484 servlet NOTICE started: >> org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f >> >> >> But the strange thing is, if I edit the value of the web.xml and >> point the a false place >> (where the wiki.propoerties file doesn't exist) it give another >> error. So my guess is that >> it can find the wiki.props file but there is a diverent routine for >> getting the content >> which handels the location of the porps file differently. >> (Wild guess.....) >> >> How can I quick fix this? >> >> I might be needing this wiki tomorrow at a big customer, and want to >> introduce a little webmacro >> while I'm at it. >> >> So step in and help me out....! >> (cry for help) >> >> -marcello- >> >> >> Lane Sharman wrote: >> >>> Hi, >>> >>> The head version of wiki is backward compatible. >>> >>> However, it has features for creating a private wiki. In short, with >>> the security property turned on (see wiki.properties), a user cannot >>> browse the web site until the administrator approves him to do so. >>> >>> this was a constant complaint among corporate users of a wiki. >>> >>> -Lane >>> >>> marcel.huijkman wrote: >>> >>>> I'm trying to get the Wiki part going but it won't compile with >>>> java 1.5 >>>> So I've changed all the Enummeration enum parts and it compiles, >>>> build etc. >>>> >>>> However when I call my wiki: >>>> http://localhost/wiki/StartPage it says: >>>> >>>> WebMacro application code failed to initialize: >>>> javax.servlet.ServletException: java.lang.IllegalArgumentException: >>>> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >>>> This error is the result of a failure in the >>>> code supplied by the application programmer. >>>> >>>> Please contact the server administrator >>>> >>>> >>>> I think the part: nulldeploy says something isn't good. >>>> Any help is welcome. >>>> >>>> Also any hints on how to use wiki as a directive. (I've read >>>> somewhere that this is possible...) >>>> >>>> BTW how is version 3 of the wiki? >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> Webmacro-user mailing list >>>> Web...@li... >>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Webmacro-user mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >>> . >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > > . > |
From: marcel.huijkman <mar...@ra...> - 2005-02-02 07:52:17
|
Lane, Sorry, but I've checked out the latest CVS yesterday, and I followed the readme. But now I've found the PDF and it's up and running. Now I'm gonna play with it! (thanks) -marcello- Lane Sharman wrote: > Marcel, > > nullDeploy signfies indeed that you have not set a property when doing > the deployment from ant. when doing the ant deployment, it takes a > property, the absolute path, and prepends this to deploy/.... I think > it is called INSTALL_DIR or something like that. > > This is in the install docs and the pdf document in the distro. > > -Lane > > marcel.huijkman wrote: > >> Okay, but how about the error? >> >> I think it has something to do with the environment variable that >> can't be found by a pice of library code, >> which happens not to be included as a source. So I can't fix this >> myself. >> >> I've installed the wiki in c:/data/website_wiki >> >> and this is what wm.log shows me: >> >> 01-02-2005 17:35:55.484 wm NOTICE new >> WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 >> 01-02-2005 17:35:55.484 servlet ERROR WebMacro application >> code failed to initialize: >> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >> does not point to a file. >> This error is the result of a failure in the >> code supplied by the application programmer. >> >> javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties >> does not point to a file. >> at >> org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) >> at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) >> at javax.servlet.GenericServlet.init(GenericServlet.java:82) >> at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) >> at >> com.caucho.server.http.Application.createServlet(Application.java:3114) >> at >> com.caucho.server.http.Application.loadServlet(Application.java:3065) >> at >> com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) >> >> at >> com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) >> >> at >> com.caucho.server.http.Application.buildFilterChain(Application.java:2765) >> >> at com.caucho.server.http.Invocation.service(Invocation.java:313) >> at >> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) >> at >> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) >> at >> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) >> >> at com.caucho.server.TcpConnection.run(TcpConnection.java:139) >> at java.lang.Thread.run(Thread.java:595) >> 01-02-2005 17:35:55.484 servlet NOTICE started: >> org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f >> >> >> But the strange thing is, if I edit the value of the web.xml and >> point the a false place >> (where the wiki.propoerties file doesn't exist) it give another >> error. So my guess is that >> it can find the wiki.props file but there is a diverent routine for >> getting the content >> which handels the location of the porps file differently. >> (Wild guess.....) >> >> How can I quick fix this? >> >> I might be needing this wiki tomorrow at a big customer, and want to >> introduce a little webmacro >> while I'm at it. >> >> So step in and help me out....! >> (cry for help) >> >> -marcello- >> >> >> Lane Sharman wrote: >> >>> Hi, >>> >>> The head version of wiki is backward compatible. >>> >>> However, it has features for creating a private wiki. In short, with >>> the security property turned on (see wiki.properties), a user cannot >>> browse the web site until the administrator approves him to do so. >>> >>> this was a constant complaint among corporate users of a wiki. >>> >>> -Lane >>> >>> marcel.huijkman wrote: >>> >>>> I'm trying to get the Wiki part going but it won't compile with >>>> java 1.5 >>>> So I've changed all the Enummeration enum parts and it compiles, >>>> build etc. >>>> >>>> However when I call my wiki: >>>> http://localhost/wiki/StartPage it says: >>>> >>>> WebMacro application code failed to initialize: >>>> javax.servlet.ServletException: java.lang.IllegalArgumentException: >>>> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >>>> This error is the result of a failure in the >>>> code supplied by the application programmer. >>>> >>>> Please contact the server administrator >>>> >>>> >>>> I think the part: nulldeploy says something isn't good. >>>> Any help is welcome. >>>> >>>> Also any hints on how to use wiki as a directive. (I've read >>>> somewhere that this is possible...) >>>> >>>> BTW how is version 3 of the wiki? >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive >>>> Reporting >>>> Tool for open source databases. Create drag-&-drop reports. Save time >>>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>>> _______________________________________________ >>>> Webmacro-user mailing list >>>> Web...@li... >>>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>>> >>> >>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Webmacro-user mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >>> . >>> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > > . > |
From: Lane S. <la...@op...> - 2005-02-02 07:31:55
|
Marcel, nullDeploy signfies indeed that you have not set a property when doing the deployment from ant. when doing the ant deployment, it takes a property, the absolute path, and prepends this to deploy/.... I think it is called INSTALL_DIR or something like that. This is in the install docs and the pdf document in the distro. -Lane marcel.huijkman wrote: > Okay, but how about the error? > > I think it has something to do with the environment variable that > can't be found by a pice of library code, > which happens not to be included as a source. So I can't fix this myself. > > I've installed the wiki in c:/data/website_wiki > > and this is what wm.log shows me: > > 01-02-2005 17:35:55.484 wm NOTICE new > WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 > 01-02-2005 17:35:55.484 servlet ERROR WebMacro application > code failed to initialize: > javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties > does not point to a file. > This error is the result of a failure in the > code supplied by the application programmer. > > javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties > does not point to a file. > at > org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) > at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) > at javax.servlet.GenericServlet.init(GenericServlet.java:82) > at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) > at > com.caucho.server.http.Application.createServlet(Application.java:3114) > at > com.caucho.server.http.Application.loadServlet(Application.java:3065) > at > com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) > > at > com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) > > at > com.caucho.server.http.Application.buildFilterChain(Application.java:2765) > > at com.caucho.server.http.Invocation.service(Invocation.java:313) > at > com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) > at > com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) > at > com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) > at com.caucho.server.TcpConnection.run(TcpConnection.java:139) > at java.lang.Thread.run(Thread.java:595) > 01-02-2005 17:35:55.484 servlet NOTICE started: > org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f > > > But the strange thing is, if I edit the value of the web.xml and point > the a false place > (where the wiki.propoerties file doesn't exist) it give another error. > So my guess is that > it can find the wiki.props file but there is a diverent routine for > getting the content > which handels the location of the porps file differently. > (Wild guess.....) > > How can I quick fix this? > > I might be needing this wiki tomorrow at a big customer, and want to > introduce a little webmacro > while I'm at it. > > So step in and help me out....! > (cry for help) > > -marcello- > > > Lane Sharman wrote: > >> Hi, >> >> The head version of wiki is backward compatible. >> >> However, it has features for creating a private wiki. In short, with >> the security property turned on (see wiki.properties), a user cannot >> browse the web site until the administrator approves him to do so. >> >> this was a constant complaint among corporate users of a wiki. >> >> -Lane >> >> marcel.huijkman wrote: >> >>> I'm trying to get the Wiki part going but it won't compile with java >>> 1.5 >>> So I've changed all the Enummeration enum parts and it compiles, >>> build etc. >>> >>> However when I call my wiki: >>> http://localhost/wiki/StartPage it says: >>> >>> WebMacro application code failed to initialize: >>> javax.servlet.ServletException: java.lang.IllegalArgumentException: >>> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >>> This error is the result of a failure in the >>> code supplied by the application programmer. >>> >>> Please contact the server administrator >>> >>> >>> I think the part: nulldeploy says something isn't good. >>> Any help is welcome. >>> >>> Also any hints on how to use wiki as a directive. (I've read >>> somewhere that this is possible...) >>> >>> BTW how is version 3 of the wiki? >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >>> Tool for open source databases. Create drag-&-drop reports. Save time >>> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >>> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >>> _______________________________________________ >>> Webmacro-user mailing list >>> Web...@li... >>> https://lists.sourceforge.net/lists/listinfo/webmacro-user >>> >> >> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> >> . >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > |
From: marcel.huijkman <mar...@ra...> - 2005-02-02 07:24:59
|
Okay, but how about the error? I think it has something to do with the environment variable that can't be found by a pice of library code, which happens not to be included as a source. So I can't fix this myself. I've installed the wiki in c:/data/website_wiki and this is what wm.log shows me: 01-02-2005 17:35:55.484 wm NOTICE new WebMacro(Application[url=/wiki,host=http://localhost]) v20041201 01-02-2005 17:35:55.484 servlet ERROR WebMacro application code failed to initialize: javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties does not point to a file. This error is the result of a failure in the code supplied by the application programmer. javax.servlet.ServletException: nulldeploy/WEB-INF/Wiki.Properties does not point to a file. at org.tcdi.opensource.wiki.servlet.WikiServlet.start(WikiServlet.java:89) at org.webmacro.servlet.WMServlet.init(WMServlet.java:143) at javax.servlet.GenericServlet.init(GenericServlet.java:82) at org.webmacro.servlet.WMServlet.init(WMServlet.java:92) at com.caucho.server.http.Application.createServlet(Application.java:3114) at com.caucho.server.http.Application.loadServlet(Application.java:3065) at com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435) at com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809) at com.caucho.server.http.Application.buildFilterChain(Application.java:2765) at com.caucho.server.http.Invocation.service(Invocation.java:313) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:164) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:595) 01-02-2005 17:35:55.484 servlet NOTICE started: org.tcdi.opensource.wiki.servlet.WikiServlet@160a26f But the strange thing is, if I edit the value of the web.xml and point the a false place (where the wiki.propoerties file doesn't exist) it give another error. So my guess is that it can find the wiki.props file but there is a diverent routine for getting the content which handels the location of the porps file differently. (Wild guess.....) How can I quick fix this? I might be needing this wiki tomorrow at a big customer, and want to introduce a little webmacro while I'm at it. So step in and help me out....! (cry for help) -marcello- Lane Sharman wrote: > Hi, > > The head version of wiki is backward compatible. > > However, it has features for creating a private wiki. In short, with > the security property turned on (see wiki.properties), a user cannot > browse the web site until the administrator approves him to do so. > > this was a constant complaint among corporate users of a wiki. > > -Lane > > marcel.huijkman wrote: > >> I'm trying to get the Wiki part going but it won't compile with java 1.5 >> So I've changed all the Enummeration enum parts and it compiles, >> build etc. >> >> However when I call my wiki: >> http://localhost/wiki/StartPage it says: >> >> WebMacro application code failed to initialize: >> javax.servlet.ServletException: java.lang.IllegalArgumentException: >> nulldeploy/WEB-INF/Wiki.Properties does not point to a file. >> This error is the result of a failure in the >> code supplied by the application programmer. >> >> Please contact the server administrator >> >> >> I think the part: nulldeploy says something isn't good. >> Any help is welcome. >> >> Also any hints on how to use wiki as a directive. (I've read >> somewhere that this is possible...) >> >> BTW how is version 3 of the wiki? >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting >> Tool for open source databases. Create drag-&-drop reports. Save time >> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. >> Download a FREE copy at http://www.intelliview.com/go/osdn_nl >> _______________________________________________ >> Webmacro-user mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/webmacro-user >> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Webmacro-user mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/webmacro-user > > . > |