Hi...I am new to struts2...Have any tell me how to pass struts action class variable into java script
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=...in the querystring.
<?php $actionClass = $_GET('actionClass');//sanitized as necessary to prevent code injection (though struts may immunize you from that). ?> <script> ... var actionClass = <?php =$actionClass ?>; ... </script>
I dare say it's similar in JSP if that's what you are using.