Re: Initializing Velocity ouside of a servlet

2005-06-28 Thread Markos Charatzas
Hello Leo, For starters, try and initialize velocity with a Properties object loaded using a Resource. Make sure that velocity.properties is in the classpath. e.g. InputStream vProps = this.getClass().getResourceAsStream(/velocity.properties); try { Properties

Standalone Application Toolbox

2005-06-21 Thread Markos Charatzas
Hi there, It is possible to have a toolbox in a standalone velocity application? Thanks in advance, Markos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Standalone Application Toolbox

2005-06-21 Thread Markos Charatzas
Im using the org.apache.velocity.tools.view.XMLToolboxManager to load the toolbox, but do I need to register it somehow with the VelocityEngine? Thanks, Markos On Tuesday 21 June 2005 14:29, Markos Charatzas wrote: Hi there, It is possible to have a toolbox in a standalone velocity

Re: Standalone Application Toolbox

2005-06-21 Thread Markos Charatzas
the #foreach directive... Thanks, Markos On Tuesday 21 June 2005 14:58, Markos Charatzas wrote: Im using the org.apache.velocity.tools.view.XMLToolboxManager to load the toolbox, but do I need to register it somehow with the VelocityEngine? Thanks, Markos On Tuesday 21 June 2005 14:29, Markos

Re: Standalone Application Toolbox

2005-06-21 Thread Markos Charatzas
Just used the new VelocityContext(Context context) constructor to wrap the toolbox context. Hope someone will find this thread useful! :p Sorry for the trouble, Markos On Tuesday 21 June 2005 15:21, Markos Charatzas wrote: Digging around I found out that I just jave to use the context

Re: Encoding Problem

2005-05-03 Thread Markos Charatzas
In velocity.properties use input.encoding=ISO-8859-7 or UTF-8, depending on the encoding of the templates. Regards, Markos On Tuesday 03 May 2005 10:26, Sandeep kamath wrote: Hi, I am quite new to Velocity. My requirement is that I need to process a template that has greek characters in

Re: Velocity and JDBC

2005-02-23 Thread Markos Charatzas
Hm... Im quite skeptical about this... Why not use a proper OR mapping tool (e.g. hibernate), provide a complete db implementation (Database, DatabaseRequest, DatabaseClient) and then use a db client wrapper to place as a tool using the velocity toolbox. Regards, Markos On Wednesday 23

Re: Velocity and JDBC

2005-02-23 Thread Markos Charatzas
14:51, Claude Brisson wrote: On Wed, 2005-02-23 at 12:39 +0200, Markos Charatzas wrote: Hm... Im quite skeptical about this... Why not use a proper OR mapping tool (e.g. hibernate), provide a complete db implementation (Database, DatabaseRequest, DatabaseClient) and then use a db

Re: tomcat 4.1.31 and velocity - template location problem

2005-02-21 Thread Markos Charatzas
Hello Michael, In a servlet environment I would recommed that you use a org.apache.velocity.tools.view.servlet.WebappLoader with the loader.path specified as you have it already. Have a good week :) Markos On Sunday 20 February 2005 19:57, Michael Salmon wrote: Just a follow-up. I found that

Re: Application Resources and TextTool

2005-02-11 Thread Markos Charatzas
On Thursday 10 February 2005 17:50, Nathan Bubna wrote: i only rarely put things directly into the request myself. i mostly use tools to access my request scoped data. those are easy enough to keep track of in my toolbox.xml file. So how do u go on about data that you want to make available

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 07:21, Shinobu Kawai wrote: resource files and charset might be your problem. Do you mean your resource files have non-ascii characters in it? If so, that's your problem. They must be escaped java-wise like \u1234. cf.

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
Just to point out that the data stored in the DB is using cp-1253 :/ So far I didnt have to deal with ResourceBundles so all text was inside the HTML templates. I cant seem to understand why setting the output encoding in velocity.properties to ISO-8859-7 would cause the data coming from the

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 07:21, Shinobu Kawai wrote: They must be escaped java-wise like \u1234. Shinobu I did that and it worked. Thanks. Although I find it a bit hard to accept that any resource bundle must be in that format. That makes life a bit harder :/ Still I cannot understand why

Re: Charset (Struts and Velocity)

2005-02-11 Thread Markos Charatzas
On Friday 11 February 2005 17:45, Shinobu Kawai wrote: It's all Java stuff. Java stores data in memory as Unicode, so everything going into Java must be converted into Unicode. Currently, there is no way Java can tell whether a file is ascii or Greek or Japanese or whatever. So, you have to

Re: Application Resources and TextTool

2005-02-10 Thread Markos Charatzas
entry made to the request? How do I go on about this? Thanks in advance, Markos Charatzas On Wednesday 09 February 2005 19:25, Nathan Bubna wrote: the relevant code (in veltools 1.1's StrutsUtils) is doing the following: resources = (MessageResources) request.getAttribute(bundle

Re: Charset (Struts and Velocity)

2005-02-10 Thread Markos Charatzas
Hi Shinobu, #* Actually, the output.encoding doesn't matter unless you're using VelocityServlet or Anakia. ;) Yeap you are right...it must have been there since we migrated to VelocityViewServlet :) Please refresh my memory. Was there a way to specify content type in resource files? I

Application Resources and TextTool

2005-02-09 Thread Markos Charatzas
the 's' missing) using the new key value... and it works :/ thats using velocity-tools-1.1 I also have other resources that use the same notation, message-resources parameter=IndexResources key=index / and cause me no problems. Thanks in advance, Markos Charatzas

Charset (Struts and Velocity)

2005-02-09 Thread Markos Charatzas
4. my resource files are in the corrent content type I still get question marks (?) displayed back to the browser when displaying anything that comes from an ApplicationResource file :( Thanks in advance. Markos Charatzas

Struts Velocity

2005-02-08 Thread Markos Charatzas
the logic to populate the context is defined in a different class. In Turbine for example there is method which gets called and serves for populating the context. Thanks for your input. Markos Charatzas - To unsubscribe, e-mail: [EMAIL

Re: Struts Velocity

2005-02-08 Thread Markos Charatzas
Thanks for your input! The easy way is to use the Velocity Servlet in velocity tools. By mapping say any vm file to the servlet you can process vm files. And yes, putting the data in the request or the session will make it available to the view. There isn't anywhere else really. Yeah thats

Re: Struts Velocity

2005-02-08 Thread Markos Charatzas
Peter, you are 100% right that it should belong there. Actually the way I see it is that as ActionServlet handles Actions so VelocityViewServlet should handle Views! :) Perhaps we will implement it ourselves actually since we are moving into the Chinese market this year. Well that is why