Onload javascript

Is there any way to trigger an onload event. I would like for a method in one of my classes to get called when a particular jsp page is loaded.

So something like

<h:SOMETAG onload="#{mybean.myfunc}" />

Or maybe there's a better way to do what I'm thinking: I want to be able to access the application using an external link (passing some parameters). I thought I'd use a regular servlet to handle the doGet method (where I set some parameters in the session), then send the redirect to this jsp page which will call the function I want when the page loads, and JSF will handle the actions from then on.

I know, it's kind of roundabout--but it would be nice to somehow have a way to access the request parameters, make the appropriate function calls & have JSF then forward to the right page based on the returned string. I don't know if this servlet->jsp forwarding to a function in my code is the best approach, or if that's even possible.

Thanks.

[1032 byte] By [radtad82a] at [2007-10-2 23:56:26]
# 1
Use the constructor or a getter of the backing bean.
BalusCa at 2007-7-14 16:43:03 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...