1.?????? ShowDataSHRDSOURCE.java 類:建立與 oracle 的連接,通過給 getViewData() 函數(shù)傳入一個(gè)參數(shù) tableName ( getViewData(String tableName) 函數(shù) ), 根據(jù) tableName 參數(shù)執(zhí)行相應(yīng)得 sql 語句,實(shí)現(xiàn)從 oracle 中讀取要顯示在地圖中的數(shù)據(jù);

2.?????? 修改 MapServlet.java

search ()方法多添加一個(gè)參數(shù) tableName ,把 tableName 的值傳給需要它的 getViewData(String tableName) 函數(shù);

?

實(shí)現(xiàn) doGet() 方法,多接受一個(gè)參數(shù) tableName ,把 tableName 傳給 search ()函數(shù) ;

(即: String tableName =request.getParameter(“tableName”); search(request,type,tableName );

3.?????? index2.jsp

type tableName 的值傳給 MapServlet

Var url=’ BasePlatform_project/servlet/MapServlet ’;

Var pars=’type= ’+par+’&tableName’=tableName;

( 注:路徑為: url?pars; 即: /servlet/MapServlet ’type= ’+par+’&tableName’=tableName )

?

?

問題:

Jsp,servlet,java 類之間的傳遞有待學(xué)習(xí)

?