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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:47:32+00:00 2026-06-18T12:47:32+00:00

I want to create a dynamic table accepting book attributes when it has provided

  • 0

I want to create a dynamic table accepting book attributes when it has provided the no. of books to be entered on the previous page.
But I am not getting anything.

This is my code:

<table>
<c:forEach begin="1" end= "${ no }" step="1" varStatus="loopCounter">
<tr>
<td>
<input type='text' name="isbn" placeholder="ISBN">
</td>
<td>
<input type="text" name="Title" placeholder="Title">
</td>
<td>
<input type="text" name="Authors" placeholder="Author">
</td>
<td>
<input type="text" name="Version" placeholder="Version">
</td>
</tr>
</c:forEach>
</table>

${no} is the count of number of books I want to enter.
I am new here. Sorry if the title is not clear. Please help.

  • 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-18T12:47:34+00:00Added an answer on June 18, 2026 at 12:47 pm

    You’re not getting anything because you’re not iterating your list of books. Also, you’re only printing lots of <input type="text" /> on each iteration. Your code should look like this (assuming that your list of books is lstBooks and it’s already initialized):

    <table>
        <!-- here should go some titles... -->
        <tr>
            <th>ISBN</th>
            <th>Title</th>
            <th>Authors</th>
            <th>Version</th>
        </tr>
        <c:forEach begin="1" end= "${ no }" step="1" varStatus="loopCounter"
            value="${lstBooks}" var="book">
        <tr>
            <td>
                <c:out value="${book.isbn}" />
            </td>
            <td>
                <c:out value="${book.title}" />
            </td>
            <td>
                <c:out value="${book.authors}" />
            </td>
            <td>
                <c:out value="${book.version}" />
            </td>
        </tr>
        </c:forEach>
    </table>
    

    After understanding your problem based on comments, make sure the ${no} variable is available at request.getAttribute("no"). You can test this using a scriptlet (but this is a bad idea) or just using <c:out value="${no}" />.

    Note that as I’ve said, the variable should be accesible through request.getAttribute, do not confuse it with request.getParameter.

    By the way, you can set a variable if you know which could be it’s value like this:

    <c:set var="no" value="10" />
    

    And then you can access to it using ${no}.

    More info: JSTL Core Tag

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

Sidebar

Related Questions

this table i want to create job_id dynamic Jobs Title text Job Description text
I want to create a Dynamic aspx Page in current solution through code-behind..forexample i
I want to know how to create dynamic table in mySql . I have
I am trying to create a dynamic table using JQuery. Right now, I want
I want to create a dynamic table whose row uses customized button which uses
I want to create a temporary table in a dynamic query and use it
I want to create a dynamic table.My problem is this that I want to
I want to create dynamic chart in my webpage.I use stringbuilder but i can
I am created a dynamic table, now I want value of particular row and
i want create Dynamic Slideshow in Jquery i'm Write this code var ctx =

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.