index.jsp
<%@page contentType=“text/html”%>
<%@page pageEncoding=“UTF-8”%>
<%–
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library… action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
–%>
<%–
<%@taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c”%>
–%>
<h1>JSP Page</h1>
<a href="Listagem.jsp">Lista </a>
<%--
This example uses JSTL, uncomment the taglib directive above.
To test, display the page like this: index.jsp?sayHello=true&name=Murphy
--%>
<%--
<c:if test="${param.sayHello}">
<!-- Let's welcome the user ${param.name} -->
Hello ${param.name}!
</c:if>
--%>
</body>
/////////////////////////ServerConfiguration.jsp
<%<a class="mention" href="/u/page">@page</a> contentType=“text/html”%>
<%<a class="mention" href="/u/page">@page</a> pageEncoding=“UTF-8”%>
<%
String DatabaseAddr=“jdbc:firebirdsql:localhost:8084:C:/banco.gdb”;
String UserName=“SYSDBA”;
String Password=“masterkey”;
%>
///////////////////////Listagem.jsp
<%@page contentType=“text/html”%>
<%@page pageEncoding=“UTF-8”%>
<%@
include file=“ServerConfiguration.jsp”
%>
<%@
page import=“org.firebirdsql.jdbc.,org.firebirdsql.logging.Logger,java.sql.”
%>
<%
Class.forName(“org.firebirdsql.jdbc.FBDriver”);
Connection aConnection = DriverManager.getConnection(DatabaseAddr,UserName, Password);
Statement stmt = aConnection.createStatement();
String Sql=“Select * from clientes”;
ResultSet aQuery=stmt.executeQuery(Sql);
%>
<%–
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library… action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
–%>
<%–
<%@taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c”%>
–%>
<h1>JSP Page</h1>
<%--
This example uses JSTL, uncomment the taglib directive above.
To test, display the page like this: index.jsp?sayHello=true&name=Murphy
--%>
<%--
<c:if test="${param.sayHello}">
<!-- Let's welcome the user ${param.name} -->
Hello ${param.name}!
</c:if>
--%>
</body>
Esta dando o seguinte erro:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Resource Exception. Unable to complete network request to host “8084”.
Failed to establish a connection.
Reason: Unable to complete network request to host “8084”.
Failed to establish a connection.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.Listagem_jsp._jspService(Listagem_jsp.java:101)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
root cause
org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unable to complete network request to host “8084”.
Failed to establish a connection.
Reason: Unable to complete network request to host “8084”.
Failed to establish a connection.
org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:107)
org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:275)
java.sql.DriverManager.getConnection(DriverManager.java:525)
java.sql.DriverManager.getConnection(DriverManager.java:171)
org.apache.jsp.Listagem_jsp._jspService(Listagem_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
Apache Tomcat/5.5.9
O que significa isso??
Evandro