Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
Need to implement RESTful web services in Struts2 and Spring

I am currently working on a web application that is based on Strtus2, Spring, open JPA and LDAP.

Now client wants us to develop RESTful api for this system so that other websites or application can integrate with it.

This task has been assigned to me and I clearly have no idea from where to start.

I have done my research and found out that, there is a plugin struts2-rest and for Spring there are several different ways.

More to that most of the example I have been seen are using Maven, but our project does not use that.

So, I just need a direction to start this thing.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In Struts2 you can implement RESTful api via struts2-rest-plugin. The starting point is REST Plugin.

Setting Up

Assuming you have a normal Struts 2 application, all you need to do for this REST demo is to add the following two plugins:

Struts 2 Rest Plugin
Struts 2 Convention Plugin

Note, you can download the jars for these plugins from Maven Central Configuration ( struts.xml )

Just dropping the plugin's into your application may not produce exactly the desired effect. There are a couple of considerations. The first consideration is whether you want to have any non-RESTful URL's coexisting with your RESTful URL's. We'll show two configurations. The first assumes all you want to do is REST. The second assumes you want to keep other non-RESTful URL's alive in the same Struts 2 application.


In the Home of Struts2 docs you'll find everything necessary to start developing Struts2 application.

Resources:

  • Struts 2 Rest Showcase Webapp
  • Creating java web applications with AngularJS and Struts2
  • Struts 2 + REST Web Service Integration Example
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!