I have develop source code for login page using JSP and JSTL, but i don't know how to connect to Oracle10g database.
login.jsp
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Sistem Maklumat Pelajar,UPM</title>
</head>
<body>
<P>
<img src="gambar/banner_login.jpg" width="479" height="57"/>
</P>
<P>Sistem Maklumat Pelajar Universiti Putra Malaysia</P>
<DIV align="center">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td>
<form method="post" action="authenticate.jsp">
<input type="hidden" name="origURL"
value="${fn:escapeXml(param.origURL)}">
<P align="right">
<FONT size="2">SMP Login</FONT>
</P>
<P align="right">
<FONT size="2">ID :
<input type="text" name ="ID" value="${fn:escapeXml(cookie.ID.value)}" size="10" tabindex="1" id = "ID" title="ID :"/> Kata Laluan :
<input type="password" name="KLaluan" value="${fn:escapeXml(cookie.KLaluan.value)}" size="10" tabindex="2" title="KLaluan" id="KLaluan"/>
<input type="SUBMIT" name="Login" value="Login" id="Login" tabindex="3" size="10"/></FONT>
</P>
</form>
</td>
</tr>
<tr align="left" valign="top">
<td height="497">
<P>Maklumat SMP</P>
<UL>
<LI>Manual Pengguna SMP</LI>
<LI>
Muat turun Jinit,Acrobat,Netscape 4.6</LI>
</UL>
</td>
</tr>
<tr>
<td height="22">
<DIV align="right">
<FONT size="1">Copyright � 1995 SMP Group All Rights Reserved</FONT>
</DIV>
</td>
</tr>
</table>
</DIV>
</body>
</html>
authenticate.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%-- <%@ taglib prefix="ora" uri="orataglib" %> --%>
<%-- Remove the validUser session bean, if any --%>
<c:remove var="validUser" />
<c:if test="${empty param.ID || empty param.KLaluan}">
<c:redirect url="login.jsp" >
<c:param name="errorMsg"
value="You must enter a User Name and Password." />
</c:redirect>
</c:if>
<%--
See if the user name and password combination is valid. If not,
redirect back to the login page with a message.
--%>
<sql:query var="userInfo">
SELECT * FROM akd.PASS_PEL
WHERE PEL_ID = ? AND PEL_PASSWD = ?
<sql:param value="${param.ID}" />
<sql:param value="${param.KLaluan}" />
</sql:query>
<c:if test="${empInfo.rowCount == 0}">
<c:redirect url="login.jsp" >
<c:param name="errorMsg"
value="The User Name or Password you entered is not valid." />
</c:redirect>
</c:if>
<c:choose>
<c:when test="${!empty param.remember}">
<ora:addCookie name="ID"
value="${param.ID}"
maxAge="2592000" />
<ora:addCookie name="KLaluan"
value="${param.KLaluan}"
maxAge="2592000" />
</c:when>
<c:otherwise>
<ora:addCookie name="ID"
value="${param.ID}"
maxAge="0" />
<ora:addCookie name="KLaluan"
value="${param.KLaluan}"
maxAge="0" />
</c:otherwise>
</c:choose>
<%--
Redirect to the main page or to the original URL, if
invoked as a result of a access attempt to a protected
page.
--%>
<c:choose>
<c:when test="${!empty param.origURL}">
<c:redirect url="${param.origURL}" />
</c:when>
<c:otherwise>
<c:redirect url="login.jsp" />
</c:otherwise>
</c:choose>
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-apps_2_4.xsd" version="2.4">
<taglib>
<taglib-uri>http://java.sun.com/jstl-el/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl-el/xml</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl-el/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl-el/sql</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>
<servlet>
<servlet-name>HelloWorld</servlet-name>
<servlet-class>HelloWorld</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorld</servlet-name>
<url-pattern>/HelloWorld</url-pattern>
</servlet-mapping>
<resource-ref>
<res-ref-name>jdbc/smp</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
for Oracle dirver, i have put all jar file in $CATALINA_LINA/common/lib
my Tomcat version is 5
I hope anybody me..plz