You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Akshay Kapur <ak...@cisco.com> on 2002/07/29 20:56:43 UTC

Velocity Run time logs

Hi

I am getting a lot of log output on my log file. Please see these at the 
bottom of this mail.

First I would like to know if these are Velocity logs. If yes, then I have 
tried to turn off the Velocity run time log output but haven't been successful.

- In velocity.properties, I have put the following settings -
services.VelocityService.runtime.log.info.stacktrace = false
services.VelocityService.runtime.log.warn.stacktrace = false
services.VelocityService.runtime.log.error.stacktrace = false
services.VelocityService.runtime.log.invalid.reference = false

- I have put the same settings in TurbineResources.properties in the 
Velocity Service section as well just to be sure.

Inspite of the above two config settings, I am getting a huge amount of log 
messages in the log file due to which I believe the performance of my app 
under a load test is dead slow. Please help!!

Log Message I am getting
-------------------------------------
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
screens/ManagerHome.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Jul 29 14:26:18 EDT 2002  [error] Left side of '>' operation has null 
value. Operation not possible. screens/ManagerHome.vm [line 155, column 66]
Mon Jul 29 14:26:18 EDT 2002  [error] Left side of '>' operation has null 
value. Operation not possible. screens/ManagerHome.vm [line 168, column 65]
Mon Jul 29 14:26:18 EDT 2002  [error] Left side of '>' operation has null 
value. Operation not possible. screens/ManagerHome.vm [line 174, column 46]
Mon Jul 29 14:26:18 EDT 2002   [warn] Warning! The reference $keys is an 
Enumeration in the #foreach() loop at [299,35] in template 
screens/ManagerHome.vm. Because it's not resetable, if used in more than 
once, this may lead to unexpected results.
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
layouts/MgrHome.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
navigations/SfcdCss.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
navigations/ManagerHomeTop.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
navigations/MgrMenu.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Jul 29 14:26:18 EDT 2002   [info] ResourceManager : found 
navigations/DefaultBottom.vm with loader 
org.apache.velocity.runtime.resource.loader.FileResourceLoader

Re: Render "tool"

Posted by Gabriel Sidler <si...@teamup.com>.
Nick Temple wrote:

...

> 
> One thing I did run into is no "standard" to create velocity tools.  

> Would it be worthwhile to create a (minimal) VelocityTool interface that

> can be implemented / extended by various frameworks to use off-the shells

> tools? Or is there one available that I missed?


Nick,
as part of the jakarta-velocity-tools subproject we have created
interface ViewTool.java as a standard interface for view tools.

http://cvs.apache.org/viewcvs/jakarta-velocity-tools/view/src/java/org/apache/velocity/tools/view/tools/

There has been quite some discussion on how simple or sophisticated
such a tool interface should be. I am actually curious if the
current approach suits the needs of most people.

Gabe


> 
> Nick
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> .
> 
> 


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Render "tool"

Posted by Nick Temple <nt...@alivecity.com>.
Geir --

Thanks for the (multiple) tips on the render / execute "tool" - reading the list helped solve a problem I didn't know I had. The following code snippet works anyplace I have access to the context::

  context.put("velocotityengine", ve);
...
  public String render(String templatePath) throws Exception {
     VelocityEngine ve = (VelocityEngine) context.get("velocityengine");
     StringWriter sw = new StringWriter();
     Template t = ve.getTemplate( templatePath );
     t.merge( context, sw );
     return sw.toString();
  }

I also have  tool that will render nearly any single-level JSP tag [specifically activeedit from cfdev.com] It doesn't handle
nested tags, ie, <jsp:tag1> .... <jsp:tag2 /> ... </jsp:tag1> ...  at that point your pretty much stuck with a JSP include ... I was pointed to some code to do that in the Webwork framework.

I'll be packaging some of this stuff up later to contribute, assuming there is interest.  Is there?

One thing I did run into is no "standard" to create velocity tools.  Would it be worthwhile to create a (minimal) VelocityTool interface that can be implemented / extended by various frameworks to use off-the shelf tools? Or is there one available that I missed?

Nick




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Velocity Run time logs

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 7/29/02 2:56 PM, "Akshay Kapur" <ak...@cisco.com> wrote:

> Hi
> 
> I am getting a lot of log output on my log file. Please see these at the
> bottom of this mail.

> 
> First I would like to know if these are Velocity logs. If yes, then I have
> tried to turn off the Velocity run time log output but haven't been
> successful.
> 
> - In velocity.properties, I have put the following settings -
> services.VelocityService.runtime.log.info.stacktrace = false
> services.VelocityService.runtime.log.warn.stacktrace = false
> services.VelocityService.runtime.log.error.stacktrace = false
> services.VelocityService.runtime.log.invalid.reference = false
> 
> - I have put the same settings in TurbineResources.properties in the
> Velocity Service section as well just to be sure.
> 
> Inspite of the above two config settings, I am getting a huge amount of log
> messages in the log file due to which I believe the performance of my app
> under a load test is dead slow. Please help!!
> 

Hm. If things are slow, are you turning caching on?

(This might be best taken to the turbine list, as where to set these is
certainly a question for them.)

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>