I believe, you can't use Java in a vm file at all. It's only interpeted by
the VT Engine.
To get the date, you would have to get it in your action-class (I guess you
are talking about a velocity-portlet...) and put it into the context.

in the action class:

//get the date
context.put.("date", dateVariable);

in the vm-template
<br>
Today's date is : $date <br>
<br>


hope, I could be of any help

rob



----- Original Message ----- 
From: "FARINE Arnaud - SOP" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 29, 2004 9:35 AM
Subject: How to use java code in a vm file ?


Hi,

I want to use a java code in a vm file (top.vm) to obtain the system date.
In a VM file I don't success to use java code...Or if I can only use the
velocity language, how can I obtain the date ?

Regards


Arnaud FARINE
Ing�nieur d'�tudes

Atos Origin
System Int�gration
150, All�e Pierre Ziller
06905 Sophia-Antipolis
France

Phone +33  (0)49 715 7918
Fax +33  (0)49 715 7901
[EMAIL PROTECTED]
www.atosorigin.fr <http://www.atosorigin.fr/>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to