[Helma-user] Equivalent of servlet filters in Helma

Maksim Lin for technical support mailling lists maksim_lin at ngv.vic.gov.au
Tue Feb 5 04:07:06 CET 2008


Hi James,

onRequest() method may be what you are after.
It will be called at the start of request processing, though after th
path has been rsolved to a helma object.
However if you were to define it on the HopObject it will be called no
matter what object is matched. So in the HopObject folder, in any .js
file define a function:

function onRequest() {
	//my custom intercept code...
}

This is often used to implement security checks for example.

If however you want to be able to intrcept arbitrary paths and even ones
that don't map to any object you could use the getChildElement(name)
method.
see here for more info:
http://helma.zumbrunn.com/reference/HopObject.html#HopObject.getChildEle
ment

Maks.

> -----Original Message-----
> From: helma-user-bounces at helma.org 
> [mailto:helma-user-bounces at helma.org] On Behalf Of James Burke
> Sent: Tuesday, 5 February 2008 12:28
> To: helma-user at helma.org
> Subject: [Helma-user] Equivalent of servlet filters in Helma
> 
> Is there a way to use servlet filters in Helma? Ideally I 
> want the ability to code the servlet filters using JavaScript 
> in Helma, or something like a servlet filter: something that 
> intercepts request paths, and may do some redirection or 
> changing of the request in some manner before forwarding it 
> to the endpoint. I can use a solution that uses Java if necessary.
> 
> I am new to Helma and still learning, so I apologize if this 
> is covered somewhere. I have not been successful in my search so far.
> 
> Thank you,
> James
> _______________________________________________
> Helma-user mailing list
> Helma-user at helma.org
> http://helma.org/mailman/listinfo/helma-user
> 
> 
> 


More information about the Helma-user mailing list