%@ page import ="org.dbforms.config.DbFormsConfigRegistry,java.sql.Connection,java.sql.Statement,java.sql.ResultSet" %> <% String mandantenid="default"; //Ermittlung der Mandantenid zuerst aus Session, //wenn leer (d.h. User ist noch nicht angemeldet) //dann über request-Parameter Object mandantobject=request.getSession().getAttribute("MandantenID"); if(mandantobject != null) mandantenid=mandantobject.toString(); String mandantparam=request.getParameter("MandantenID"); if(mandantparam !=null && !mandantenid.equals("")) mandantenid=mandantparam; String queryLogo = "select contents_short from sx_captions where id='REPORT_LOGO_FILE'"; String queryLink = "select contents_short from sx_captions where id='REPORT_HEADING_URL'"; String queryInst = "select contents_short from sx_captions where id='REPORT_HEADING_INSTITUTION'"; Connection conmm=null; Statement st_Logo; Statement st_Link; Statement st_Inst; ResultSet result_Logo; ResultSet result_Link; ResultSet result_Inst; try { conmm = DbFormsConfigRegistry.instance().lookup().getConnection(mandantenid); st_Logo=conmm.createStatement(); st_Link=conmm.createStatement(); st_Inst=conmm.createStatement(); result_Logo = st_Logo.executeQuery(queryLogo); result_Link = st_Link.executeQuery(queryLink); result_Inst = st_Inst.executeQuery(queryInst); String hs_logo=""; while (result_Logo.next()) { if(result_Logo.getObject(1) !=null) hs_logo=result_Logo.getObject(1).toString(); } String hs_link=""; while (result_Link.next()) { if(result_Link.getObject(1) !=null) hs_link=result_Link.getObject(1).toString(); } String hs_inst=""; while (result_Inst.next()) { if(result_Inst.getObject(1) !=null) hs_inst=result_Inst.getObject(1).toString(); } result_Logo.close(); result_Link.close(); result_Inst.close(); st_Logo.close(); st_Link.close(); st_Inst.close(); conmm.close(); %>