Re: I want to display output from 10 SQL queries in JSP page - what is my best structure?
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Thu, 17 Apr 2008 07:27:22 -0400
terry433iid@xxxxxxxxx wrote:
I want to query SQL database tables to gather data on lab system and
services on an on-going basis, etc. I want to display all my gathered
data on single web page and have JSP started that can call SQL
statements.
But should I put all the SQL stuff in seperate JSP and reference that
from my index.jsp?
Maybe, maybe not. Almost certainly, you will have many pages besides index.jsp. Instead of naming your page 'index.jsp', design screens with their own names.
should I use 'preparedStatement' [sic] rather than running the SQL query
each time I want to get latest data from the SQK database?
You should use a PreparedStatement to run your SQL query each time you want the latest data.
is there a "refresh" button in JSP so that can reload the page (and
kick offf the SQL statements) and keep me up-to-date on the changes in
the database?
There is if you code one.
Look up the "Model 2" (as Sun calls it) Model-View-Controller (MVC) architecture.
--
Lew
.
- References:
- I want to display output from 10 SQL queries in JSP page - what is my best structure?
- From: terry433iid@xxxxxxxxx
- I want to display output from 10 SQL queries in JSP page - what is my best structure?
- Prev by Date: I want to display output from 10 SQL queries in JSP page - what is my best structure?
- Next by Date: GUI Testing
- Previous by thread: I want to display output from 10 SQL queries in JSP page - what is my best structure?
- Next by thread: GUI Testing
- Index(es):