package _osinerg; import oracle.jsp.runtime.*; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.io.*; import java.util.*; import java.lang.reflect.*; import java.beans.*; import java.sql.*; import javax.sql.*; import oracle.jsp.dbutil.ConnCacheBean; public class _hidro extends oracle.jsp.runtime.HttpJsp { public final String _globalsClassName = null; // ** Begin Declarations // ** End Declarations public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType( "text/html;charset=iso-8859-1"); /* set up the intrinsic variables using the pageContext goober: ** session = HttpSession ** application = ServletContext ** out = JspWriter ** page = this ** config = ServletConfig ** all session/app beans declared in globals.jsa */ JspFactory factory = JspFactory.getDefaultFactory(); PageContext pageContext = factory.getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true); // Note: this is not emitted if the session directive == false HttpSession session = pageContext.getSession(); if (pageContext.getAttribute(OracleJspRuntime.JSP_REQUEST_REDIRECTED, PageContext.REQUEST_SCOPE) != null) { pageContext.setAttribute(OracleJspRuntime.JSP_PAGE_DONTNOTIFY, "true", PageContext.PAGE_SCOPE); factory.releasePageContext(pageContext); return; } ServletContext application = pageContext.getServletContext(); JspWriter out = pageContext.getOut(); _hidro page = this; ServletConfig config = pageContext.getServletConfig(); try { // global beans // end global beans out.print(__jsp_StaticText.text[0]); out.print(__jsp_StaticText.text[1]); String connStr=request.getParameter("connStr"); if (connStr==null) { connStr=(String)session.getValue("connStr"); } else { session.putValue("connStr",connStr); } if (connStr==null) { connStr="jdbc:oracle:thin:@11.160.124.12:1521:osidb"; } out.print(__jsp_StaticText.text[2]); oracle.jsp.dbutil.ConnCacheBean ccbean; if ((ccbean = (oracle.jsp.dbutil.ConnCacheBean) pageContext.getAttribute( "ccbean", PageContext.APPLICATION_SCOPE)) == null) { ccbean = (oracle.jsp.dbutil.ConnCacheBean) new oracle.jsp.dbutil.ConnCacheBean(); pageContext.setAttribute( "ccbean", ccbean, PageContext.APPLICATION_SCOPE); out.print(__jsp_StaticText.text[3]); ccbean.setUser("invitado"); out.print(__jsp_StaticText.text[4]); ccbean.setPassword("invitado"); out.print(__jsp_StaticText.text[5]); ccbean.setURL( OracleJspRuntime.toStr( connStr)); out.print(__jsp_StaticText.text[6]); ccbean.setMaxLimit(5); out.print(__jsp_StaticText.text[7]); ccbean.setCacheScheme( OracleJspRuntime.toInt( ConnCacheBean.FIXED_RETURN_NULL_SCHEME)); out.print(__jsp_StaticText.text[8]); } out.print(__jsp_StaticText.text[9]); try { Connection conn = ccbean.getConnection(); Statement stmt = conn.createStatement (); ResultSet rset = stmt.executeQuery (" select pagdnovedad.url, pagdnovedad.subtitulo, pagnovportal.cod_pag, " + " pagcnovedad.cod_novedad from osinerg.pagnovportal pagnovportal, osinerg.pagdnovedad pagdnovedad, osinerg.pagcnovedad pagcnovedad" + " where pagcnovedad.cod_novedad = pagnovportal.cod_novedad " + " and pagcnovedad.cod_novedad = pagdnovedad.cod_novedad " + " and pagnovportal.cod_pag = '0002' ORDER BY orden DESC"); if (rset.next()) { out.print(__jsp_StaticText.text[10]); out.print( rset.getString(1)); out.print(__jsp_StaticText.text[11]); out.print( rset.getString(2)); out.print(__jsp_StaticText.text[12]); while (rset.next()) { out.print(__jsp_StaticText.text[13]); out.print( rset.getString(1)); out.print(__jsp_StaticText.text[14]); out.print( rset.getString(2)); out.print(__jsp_StaticText.text[15]); } out.print(__jsp_StaticText.text[16]); } else { out.print(__jsp_StaticText.text[17]); } rset.close(); stmt.close(); conn.close(); conn = null; } catch (SQLException e) { out.println("
" + "Error en Consutlta:"); out.println ("
" + e + "\n
"); } out.print(__jsp_StaticText.text[18]); out.flush(); } catch( Exception e) { try { if (out != null) out.clear(); } catch( Exception clearException) { } pageContext.handlePageException( e); } finally { if (out != null) out.close(); factory.releasePageContext(pageContext); } } private static class __jsp_StaticText { private static final char text[][]=new char[19][]; static { text[0] = "\r\n".toCharArray(); text[1] = "\r\n\r\n".toCharArray(); text[2] = "\r\n\r\n".toCharArray(); text[3] = "\r\n".toCharArray(); text[4] = "\r\n".toCharArray(); text[5] = "\r\n".toCharArray(); text[6] = "\r\n".toCharArray(); text[7] = "\r\n".toCharArray(); text[8] = "\r\n".toCharArray(); text[9] = "\r\n\r\n\r\n\r\n
\r\n\r\n \r\n | \r\n
\r\n \r\n
| \r\n \r\n
\r\n \r\n | \r\n