Typically you would either populate the <object> HTML element parameters or dynamically generate a XML datasource, then point Flash at that.
I've used both techniques successfully in the past, any server-side scripting language can be used for this.
Or with more effort (and reward) look at Macromedia's
Java Flash Remoting services, there are also some open-source clones of this.