-1

I need the JSP to create a table, a header, And then cells based on the input form of the index. So it would be as shown below. With each new row being computed from a loop where the limit, input from the user, is the number of rows it will go down.

<column1header><column2header>
 <1>            <1 computed>
 <2>             <2 computed>
 <...>           <............>
<limit>        <limit computed>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Renuz
  • 1,587
  • 7
  • 21
  • 34
  • And what is your problem? How does your output behave now? – wawek Oct 23 '15 at 06:44
  • So you should look for threads which give answer for this exception. Maybe this one will help you http://stackoverflow.com/questions/4928271/how-to-install-jstl-the-absolute-uri-http-java-sun-com-jstl-core-cannot-be-r – wawek Oct 23 '15 at 06:48

2 Answers2

1

You can do it like this:

<table>
    <!-- here should go some titles... -->
    <tr>
        <th>column1header</th>
        <th>column2header</th>
    </tr>
    <c:forEach var="i" begin="0" end="${user.limit}">
       <tr>
           <td>${i}</td>
           <td>${i} computed</td>
       </tr>
    </c:forEach>
</table>

Refer the links below:

How to create table dynamically using count and JSTL ForEach

Dynamic database table display using Jstl

Community
  • 1
  • 1
Abhash Upadhyaya
  • 717
  • 14
  • 34
0

Maybe you're not set the servlet in the web.xml properly or the path for action in form of index is wrong, since it may should contains "/" in the front.

I always insert a println code in my code when I met the problem like yours, the print code can help to locate the problem area .

HiCrispy
  • 1
  • 1
  • 3
  • Everything is working Except the End, getting the input from the index file. – Renuz Oct 23 '15 at 07:19
  • @Renuz maybe you can insert a println code after you set the lim into the user obj to see wether the number is right before it's being sending to JSP, if it's right, the problem must be occur in JSP page. – HiCrispy Oct 23 '15 at 07:24