At the risk of revealing my gross ignorance about struts, here's my best guess ...
Struts will forward either to a unique URL or to a more general URL with some query string in the path to indicate the required action.
If the page is not unique (action is determined by a quesrystring appended to the path) then you can do one of two things:
$actionClass = $_GET('actionClass');//sanitized as necessary to prevent code injection (though struts may immunize you from that).
var actionClass = <?php =$actionClass ?>;
I dare say it's similar in JSP if that's what you are using.