I have a dropdown in my jsp with all users from database. When I select a user I'm able to get the details of the corresponding result, but when I click on all it should give the total individually. Below is the code that I use to get individually.
and the get result is as below.
posted 3 years ago
- Scriptlets in a JSP page
- Database queries in a JSP page
- Queries open to SQL Injection
- Scriptlet tags used instead of expression tags
<%= rs.getString(1) %>
- Form submission invokes a JSP
- That sql query for retrieving users looks overly complicated - do you really need a hierarchical query to retrieve users? Using rownum in the query hints at troubles to me.
All in all, it looks like a horrible mess.
I'm not even 100% certain what your asking because it presumes knowledge of your application, your database structure, and whats in your head.
- start smaller
- get a good book on JSP Web application design
- java code belongs in a java class - not in a JSP page. JSP should be using JSTL and EL