문제

I'm relatively new to REST api designing. So If i'm wrong please correct me. I'm trying to add rest services for a struts application. The current code has poor design. So my first challenge is to segregate the java code in such a manner it can be utilized by both Struts action classes and the rest api(using jersey or resteasy).Currently what I have decided to to build a thin layer of Java api. Communication to this api will be simply by using Java beans. All db calls and service calls will be hidden under this layer. Since they are simple POJO it can be utilized both by REST for and for action form's in struts. I haven't implemented it, its just my idea of doing it. I have no idea if this is the right way to approach the problem.Please give suggestion's on how deal with this problem in a better manner.

I don't want to integrate Struts and Rest together i.e. It's not going to happen that Struts is getting called from REST or other way round.

도움이 되었습니까?

해결책

RestEasy works perfectly fine with any Servlet Container with whatever other framework. So This works well without any explicit configuration.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top