How to get the data in Struts from AngularJS post

前端 未结 3 1954
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 13:42

I’m using Struts1.2 with Angular to post some data and want to get the data in java.

I’m able to retrieve the data from the server and able to display it in the scre

3条回答
  •  甜味超标
    2020-12-15 14:45

    Angular does not POST form data, it transmits a JSON object to the server. For information on JSON itself, see JSON.org. There are also a wealth of libraries listed on that page (towards the bottom) that let you parse JSON in various languages, including Java. Not being a Java developer, I can't say that one of them is better than the other, but you should be able to get a good idea of suitability by reading the docs on each one.

提交回复
热议问题