0

I have a working java application based on struts. I need to make a mobile version for it. and I will expose it using RESTful web services.

I've done some researches and found out about REST Plugin for struts 2 , but it means that i will have to re write all my exisiting actions in order to transfer them to REST Controllers.

Is there a way to use my exisiting struts 2 actions code? (maybe adding some annotations or so) or do I have to rewrite the REST controllers from scratch ?

Faouzi
  • 929
  • 2
  • 15
  • 23
  • Restful mapping is different, see https://stackoverflow.com/a/26703495/573032 – Roman C May 08 '19 at 20:34
  • Thank you very much Roman, Still the idea is not quit clear for me, since the question you listed is not really my case. Could you please give me a way to go ? – Faouzi May 13 '19 at 14:47
  • Are you trying to add rest endpoints to an existing Struts 2 application? Another option is to drop in a jax-rs implementation, such as, Jersey alongside struts. – Paul Zepernick May 13 '19 at 20:29
  • Thank you @PaulZepernick, what's the use case of each one ? Jersey or Strut plugin ? how do I know which one suite the best for my case? – Faouzi May 14 '19 at 11:31
  • @Faouzy I listed the answer, and it exactly concerns to your case where you want to use restful api along with non-restful actions. If you need more links, i can give you more. If you want me to answer your question then you should rewrite it to be more clear to understand your case and has richer quality contents. – Roman C May 15 '19 at 15:54

0 Answers0