How do you integrate or create a REST web-application? I saw this plugin struts rest-plugin but the documentation does not provide any running example.

Are there any alternatives in using REST with Struts2 or maybe another REST plug in for Struts2? I googled another framework that supports REST and I saw spring framework. Is there anyway I can merge Spring frameworks rest with Struts2 rest if so how?

没有正确的解决方案

其他提示

Spring supports Struts 1 and 2 and Java Faces. It also has its own web MVC frame that's a big improvement on all of them, in my opinion.

Whether you're doing it from Spring services or Struts Action classes, you just need to invoke REST or SOAP clients that call your REST or SOAP services to fulfill the use case. You really just need a good client library.

REST is easy - any HTTP client will do.

SOAP clients can be had from Apache or Spring.

Take a look at these examples on how to build a REST application with Struts2 (and the REST plugin):

example1

example2

yes you can integrate it all, see my blog post, it has detailed description and a code example which shows exactly how to make this all work together, from zero to production.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top