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 8800245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:32:06+00:00 2026-06-14T00:32:06+00:00

I have just started to learn how servlets and jsp works but I am

  • 0

I have just started to learn how servlets and jsp works but I am afraid I need a bit help.

The application I am writing mainly is going to consist of a page that displays a list of people together with courses they took. If one clicks on a course entry, a text field will open up where an evaluation can be inserted.
example for the list:

  • group1
    • anne
      • modern dance
      • html & css
    • henry
      • mountain biking
      • sailing
  • group2
    • kate
      • html & css
      • preparing sushi
    • …

In my database there are tables as well for the people as for the courses, groups and the evaluations.

My main problem is now to find out the database ids of a course, evaluation and person when somebody clicks on a course entry.

I think I have to store the ids somewhere in the jsp when setting up the list, but: where?

-> In the html like <li id="1"...> ? Is it a security problem that one could see all the ids when looking at the source code of the page?
The reports have to be protected against unauthorized changes..

-> Does a Bean make more sense?

-> Some interesting construct I don’t know yet?

And what prevents me from havint to make the ids visible in the GET call to the servlet?

Which is an elegant way to get this data to my servlet where my database queries are handled? (I think it is a good idea to have a servlet as Controller and the jsps as Views in a MVC pattern?!)

As you see I am not quite sure how to structure my application.
Can you help me to get a better overview?

Thank you very much in advance! 🙂

  • 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-14T00:32:07+00:00Added an answer on June 14, 2026 at 12:32 am

    For your question about the storage of the Ids on the JSP, I think it’s a bad idea. Beans are better to do that, you can easily create the lists you want using jstl and lists of objects created with beans. It will look like:

    <ul>
    <c:forEach var="grp"  items="${Group}">
                <li>
                     ${grp}
    
                     <ul>
                          <c:forEach var="pers"  items="${Person}">
                              <li>
                                   ${pers}
    
                                    ect...
                              </li>
                           </c:forEach>
                     </ul>
                </li>
            </c:forEach>
    </ul>
    

    There are a lot of methods for doing what you want.

    An MVC pattern is a real good idea. You can use a frameworks like Spring MVC for the Model and View with Hibernate JPA for the Data Access Object layer. These frameworks manages the configurations and the integrations of all entities ans there are a lot of good tutos to learn them.

    You can also use Ajax for getting the datas, but it doesn’t respect the Object-oriented programming.

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

Sidebar

Related Questions

I have just started to learn C# and I'm a little bit confused about
I have just started to learn how to code iOS apps. I have made
I have just started learning Rails, is it required for me to learn CoffeeScript
I have just started to learn the very basics of Java programming. Using a
I have just started to learn about the pros of foreign keys in database
I have just started to learn the basics of Blackberry.... So, I am facing
I have just started to learn ASP.NET MVC. When comparing ASP.NET MVC with Web
I've just started to learn about tie . I have a class named Link
I have just started to learn Scala. I was looking for something in line
I have just started to learn Haskell out of interest. I follow learnyouahaskell.com .

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.