I have written a simple code in JSP but it is showing error. I have imported the ojdbc7/14 in library. I am using Glassfish server 4 and I had to change the http port of oracle database. The following program is not working. Can anyone tell me the reason?
<%@ page import="java.sql.*" %>
<HTML>
<HEAD>
<TITLE>Simple JSP to Oracle connection Example</TITLE>
</HEAD>
<BODY>
<%
Connection conn = null;
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "userinfo", "admin");
out.println("connected....!!");
}
catch(Exception e)
{
out.println("Exception : " + e.getMessage() + "");
}
%>
</BODY>
</HTML>
In the web page it is showing
HTTP Status 404 - Not Found
type Status report
messageNot Found
descriptionThe requested resource is not available.