it depends on what library you are using to access the wcm repository. if you are using NodeService, then NodeRefs can be used as unique id's and can be used to lookup assets later. if you are using AVMRemote, then you can use avm paths as keys.
in the next drop, we will be providing a library for accessing auxilliary xml assets from the jsp, xsl, and freemarker context (both static and dynamic contexts). since this is not available yet, what i'd recommend doing is mimicing the behavior of the backing beans within the sample website provided. take a look at org.alfresco.web.pr.Util.
by the way - really psyched that you're trying this stuff out. it's really raw functionality in the preview and not so much documented, but it's something we've been putting a lot of thought into over the past two weeks to make it easier for the release.