Is it possible to copy some values from render (or better action) phase to resource path?
It is possible to pass parameter from action phase to render phase as described in the Liferay Documentation: Passing Information from the Action Phase to the Render Phase.
I think that using the session for this is not feasible because of browsing in multiple tabs…
Also using ThreadLocal is not possible (it’s not the same thread).
Any ideas? I’d like to track AJAX calls (resource phase) with initial user action (action phase).
You can render parameters on page and then send AJAX requests with these parameters. You also can create static class with map session id => parameters. And render on page session id, pass it back to server when you send AJAX request and retrieve parameters from map.