I am converting a servlet based application to struts framework.I have a screen which gets data from 7 tables.I cannot use a stored procedure so has to manage using SQL queries.I thought i will query each table and set it to my struts form.The screen has lot of drop down boxes .
Please let me know the best way to query the tables.Here are the queries.
Select a.proj_id , a.proj_nm From stn_proj_et a, stn_proj b Where a.proj_id = b.proj_id And a.sftwr_id = 24 And b.stn_id = bst_id
Select round(utm_x,3) utm_x, round(utm_y,3) utm_y, stn_id From stn_loc_hist Where stn_id =bst_id And cur_use_cd = 1
select data_tp_cd from data_coll_summ where stn_id =bst_id And rownum < 2;
select lat_no,long_no,pnt_loc_dsc,srce_id,mthd_dtrmn_cd,ctrl_dtm_cd from stn_et where stn_id = bst_id select distinct sjr_utils.getcatalogvalue(mthd_dtrmn_cd) from stn_et;
select distinct sjr_utils.getcatalogvalue(ctrl_dtm_cd) from stn_et;
select distinct PROJ_NM from stn_proj_et where sftwr_id=24;
Select a.stn_alias_nm stn_alias_nm, b.alias_orgn_nm alias_orgn_nm From stn_alias_nm a, alias_orgn_et b Where a.alias_orgn_id = b.alias_orgn_id And b.alias_orgn_tp = 0 And stn_id = bst_id;
If your application's database code must be rewritten to adopt Struts in place of raw servlets, I'd contend that your app is very badly structured. The Model and persistence code should be completely independent of the UI code.
If you are refactoring the app, now is the time to get into an accepted best-practice structure. [ August 01, 2008: Message edited by: Bear Bibeault ]