REST request to JAVA Servlet

I have some JavaScript which I want to perform a REST Request (GET) to my servlet. The format of the record I want to send is in the following format ... /id1/vara/varb/varc/timedelta1,timedelta2,timedelta3,....,timedeltaN/ So basically there would be 5 attributes in each record I send. I need to batch these up - I'm sending multiple records in a single GET Request. My Get URL might look a little like the following. myservletname/id1/vara/varb/varc/timedelta1,timedelta2,timedelta3/id2/vara/varb/varc/timedelta1,timedelta2,timedelta3/id3/vara/varb/varc/timedelta1,timedelta2,timedelta3/ I'm aware on the limit of around 2000 chars in the URL String so to keep things safe I'll ensure the length of the URL is less than this. In the above example 3 records were sent to the servlet. I'm wondering how I might process these on the server end. Havent really worked with REST before in Java. What do I need to do on the server end to process these URLs to extract the data ? Thanks

以上就是REST request to JAVA Servlet的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏