| | |
helpp....correct d code
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 6
Reputation:
Solved Threads: 0
<%
try
{
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//String url="jdbc:odbc:ODVS";
Connection conn=null;//DriverManager.getConnection(url,"downtime","downtime");
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection("jdbc:oracle
ID
10.10.10.2:1521
LMDM","abc","abc");
String uid=request.getParameter("Username");
String pwd=request.getParameter("Password");
String sqlQry=("select * from USR_PASS_TB where Username='"+uid+"' and Password='"+pwd+"'");
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sqlQry);
if(rs.next()==true)
{
//response.sendRedirect("../HTML/index_group.htm");
%>
<jsp:forward page="../HTML/index_group.htm" />
<%
}
else
{
//response.sendRedirect("..HTML/invalid_login.htm");
%>
<jsp:forward page="../HTML/invalid_login.htm" />
<%
}
rs.close();
conn.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
%>
this code is not forwarding to index_group page..plzz help me out...plzzz
try
{
//Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//String url="jdbc:odbc:ODVS";
Connection conn=null;//DriverManager.getConnection(url,"downtime","downtime");
Class.forName("oracle.jdbc.driver.OracleDriver");
conn=DriverManager.getConnection("jdbc:oracle
ID
10.10.10.2:1521
LMDM","abc","abc");String uid=request.getParameter("Username");
String pwd=request.getParameter("Password");
String sqlQry=("select * from USR_PASS_TB where Username='"+uid+"' and Password='"+pwd+"'");
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sqlQry);
if(rs.next()==true)
{
//response.sendRedirect("../HTML/index_group.htm");
%>
<jsp:forward page="../HTML/index_group.htm" />
<%
}
else
{
//response.sendRedirect("..HTML/invalid_login.htm");
%>
<jsp:forward page="../HTML/invalid_login.htm" />
<%
}
rs.close();
conn.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
%>
this code is not forwarding to index_group page..plzz help me out...plzzz
![]() |
Other Threads in the Oracle Forum
- Previous Thread: Oracle sql developer question
- Next Thread: Select max date, then max time for that date?
Views: 1123 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Oracle
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware erp federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho





