Forums Register Login

tags:panel not working in a particular situation

+Pie Number of slices to send: Send
Hi.
I am trying to use the panel tag. The code below works fine, there is no problem.



When i am trying to use the same tags, when populating the table from the given data using with iterator as shown below



when i try to run the above I am getting this errror


/DataPage.jsp (line: 20, column: 84) Scripting elements ( <%!, <jsp:declaration, <%=, <jsp:expression, <%, <jsp:scriptlet ) are disallowed here.



how to overcome that..
Please someone help me out.

Thanks and Regards.
Adeeb
+Pie Number of slices to send: Send
The use of scriptlets has been discredited for over 10 years now with the introduction of JSP 2 in 2002. They should not be used in any modern JSP pages.

Moreover, tags created with the JSP 2 mechanisms cannot be used in conjunction with outdated scriptlets. That may be what you are encountering.

+Pie Number of slices to send: Send
Thanks for your reply Bear.


So is there any other way to iterate other than using jsp scrplets?? can i get and example.




Thanks
+Pie Number of slices to send: Send
I have a List containing the database table data with three columns and unknown number of rows, so wright now i was using scriplets to display it..
The other way i tried with tag is like this

<c:forEach var="ulist" items="${data}">
${ulist[0]}
${ulist[1]}
${ulist[2]}
</c:forEach>


is that correct??? i am getting error "Syntax error, insert "Finally" to complete TryStatement"
+Pie Number of slices to send: Send
That syntax error seems unrelated to your JSTL. May we see the entire JSP file with proper indentation and code tags?
+Pie Number of slices to send: Send
Finally I got it till here.



1. I can view only one row, means its not itterating.
2. When i try to use var i.e like $(ulist), i get null values. Then what for i have to take a variable when i am able to access the list directly with "data".

I think i am doing some silly mistake, its better to post the total code.



+Pie Number of slices to send: Send
Do you really not indent your code?
A "dutch baby" is not a baby. But this tiny ad is baby sized:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1377 times.
Similar Threads
problem calling servlet to build a list of data from a database and display a jsp page
Transfer the variable value from one jsp page to other
JSP not picking up getAttribute from Servlet
weird functioning of servlet
Please solve the problem.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:01:15.