velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From piero de salvia <pie...@yahoo.com>
Subject ReferenceException
Date Mon, 02 Jul 2001 22:31:53 GMT
Hi guys,

It's one of those days when nothing works...

I have:

public class Hyperlink {

	public String	Location;
	public String	Label;
}

and in my servlet I do:

Hyperlink hl = new Hyperlink();
hl.Label = "/site/section"; 
hl.Location = "Section";
ctx.put("hl", hl);

and in my template I do:

<a href="$hl.Location">$hl.Label</a>

and my result is:

<a href="$hl.Location">$hl.Label</a>


plus 2 ReferenceExceptions:

Tue Jul 03 00:29:21 GMT+02:00 2001   [warn]
org.apache.velocity.runtime.exception.ReferenceException:
reference : template = /piergi/layout/navbar.vm [line
6,column 42] : $hl.Location is not a valid reference.
Tue Jul 03 00:29:21 GMT+02:00 2001   [warn]
org.apache.velocity.runtime.exception.ReferenceException:
reference : template = /piergi/layout/navbar.vm [line
6,column 56] : $hl.Label is not a valid reference.


Should I give up programming?

piero de salvia

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Mime
View raw message