Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7634307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:08:13+00:00 2026-05-31T07:08:13+00:00

Quick design question: Is better to use a separate web app for a REST

  • 0

Quick design question: Is better to use a separate web app for a REST API(s) or not.

I currently have a Jersey REST API that serves well for machine to machine communication. Its relatively simple with GETS only. The structure is of a Jersey REST APi front end, a dao to the db store, and spring security to intercept the urls etc. This works well.

However I now need to create a web application to allow existing users the ability to login and monitor the use of their API, register for a user account, reset their credentials and change their subscription etc (plus more).

I’m wondering whether I should combine the two together, and share the same WAR file, as they both use the same back end databases etc. However, one is stateful, the other a stateless REST API requiring authentication per request…

So the approach I have adopted is to treat the stateful webapp as client to the REST API and do the following:

1) Treat the REST API as a separate web app.

2) Create the stateful web app as separate web app and use spring mvc or anything else for the front end. The persistent back end store will be the same for both. There will also be an admin component managed by spring role based security.

For the second webapp, I will allow the users to make example calls to the REST API (the first war just by clicking links and using their logged in credentials).

Does this approach seem reasonable? That is, one WAR for REST APIs, and a separate WAR for the stateful webapp.

I would appreciate any comments from those with more REST experience.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:08:15+00:00Added an answer on May 31, 2026 at 7:08 am

    Making the REST API a separate application is a good approach, regardless of the other circumstances. You should have a common jar that contains the business logic, which you can include in all projects. That way you’ll be able to invoke business methods in both the API and other web projects without any duplication.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question. What do you think, I have a few sites that use a
Just a quick database design question: Do you ALWAYS use an ID field in
Quick question. There is a legacy website (that is not under my control and
I have a quick question regarding a database that I am designing and making
Quick question: I have a very busy form going on that I have developed
Quick question about database design. If I have two databases: User_DB and Group_DB, and
A quick ASP.Net performance question... I have an ASP.Net 3.5 SP1 Application that I
Quick design question. ClassA has a method called DoSomething(args) In DoSomething(), before it can
a quick question in regards to table design.. Let's say I am designing a
Have a quick question about what would be the best way to implement iterators

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.