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

  • SEARCH
  • Home
  • 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 8032097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:17:40+00:00 2026-06-05T01:17:40+00:00

I am starting a new web app as a hobby and had a difficulty

  • 0

I am starting a new web app as a hobby and had a difficulty with the architecture.
The frond end will be HTML and some JavaScript for requests.
And the backend ,will be implemented in Java and using Spring Framework.

Lets say for example a library page where the user can view his books and his personal information.

Personal Info
-------------
Book 1
Book 2
Book 3

I want to implement this features with 2 REST services ,one for the personal information ,and another for the books that the person has.

Ex .
www.mybib.org/users/123/
www.mybib.org/users/123/books/

The thing is ,when a user first request the home page to view his books and his personal information ,how to compose this page.

  • Use a servlet / controller who replicate the code of the 2 REST
    services and then redirect to a JSP to format a HTML and JavaScript.
    Once the first load is done, for each update on the page use the Rest
    services .
    I think this is actually very bad design.

  • From a servler / controller call the REST services and then call JSP
    in order to compose a HTML and JavaScript output.Then for each update
    call the REST services.

  • From a servlet / controller return a HTML layout and make the
    javascript make 2 Ajax request when loading the page.

  • …or something else.

As you can see I am pretty new to this and in fact this is actually my first attemp to biuld a very simple web application.

  • 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-06-05T01:17:43+00:00Added an answer on June 5, 2026 at 1:17 am

    The easiest way is to simply have some kind of IndexController which after, fetching the current users list of books renders the page right away, no extra AJAXy REST calls needed.

    If you are new to all of this, that’s how I would start out. You may also want to have a look at the code in the Spring ‘petclinic’ sample application: https://src.springframework.org/svn/spring-samples/petclinic

    If you must use Ajax, I’d still have a IndexController and an index.jsp that renders the initial page. After that you javascript code can make the REST calls, for which you implement a different controller.

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

Sidebar

Related Questions

I am starting a new app that will target both web and mobile (but
I'm looking at starting a new web app which needs to be secure (if
I am starting a new Java web project that will be worked on by
I am new to mobile development, but have some experience with web app development.
I'm very new to Catalyst and just starting building up a web app to
We're looking at starting a new, specialized (customer facing) web app; there are a
I'm starting a web app that will be using asp.net membership services (with a
I'm starting a new web app project using Django and Pinax. I want to
I'm starting a new job soon, in web-app development. While I'm experienced with programming,
I have an old web app where Javascript is used to validate some dates.

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.