From JSP you have to call to the <action>
if you are using API baseed on struts.xml
. It it is not struts API then it's useless to use any plugin such as Rest plugin,and the request headersare parsed differently from both Struts and Spring frameworks. There's a lot of questions how to integrate Spring and Struts using Struts-Spring plugin, and you need to read them all to understand your problem. And it not concerned only the API calls, but a whole infrastructure of your application, including authentification and authorization services, validation services, session management services, etc. If you only need to validate the userId
with the session variable to obtain it requires an authentication. If you just pass a userId
as request parameter then retrieve it from there. If request is handled by Struts then it's just enough to declare an action class variable to store the value from the API call. If it is a spring then @RequestParam
variable is populated from the URL, and you can compare it with the session variable, and so on.