•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,918 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,215 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 485 | Replies: 3 | Solved
![]() |
•
•
Join Date: Jun 2008
Posts: 6
Reputation:
Rep Power: 0
Solved Threads: 0
what is wrong in following code
<form name="log" method="post" action="login.htm">
<%
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:thin:@10.10.10.2:1521:PLMDM","vvv","vvv");
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="login_cae.htm" />
<%
}
else
{
//response.sendRedirect("..HTML/invalid_login.htm");
%>
<jsp:forward page="index_group.htm" />
<%
}
rs.close();
conn.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
%> Last edited by ~s.o.s~ : Jul 3rd, 2008 at 3:07 pm. Reason: Added code tags, learn to use them.
Other than the fact that you shouldn't be doing this in a JSP, I don't know, since you haven't bothered to tell us what is going wrong with it, and I am not even going to attempt to guess.
What exceptions do you get?
What exceptions do you get?
Last edited by masijade : Jul 3rd, 2008 at 3:16 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,242
Reputation:
Rep Power: 10
Solved Threads: 270
The more appropriate/correct way to do it is to put jar files required by project in PROJECT_DIRECTORY/WEB-INF/lib
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Data recovery project (C++)
- Plzzz Help Me Out Guys As Soon As Possible Plzz (Motherboards, CPUs and RAM)
- urgent need!! in jsp (JSP)
- urgent help (Java)
- Need Urgent Help in Sorting (Shell Scripting)
- Urgent Help Needed!!!! Plzzz (Java)
Other Threads in the JSP Forum
- Previous Thread: JSP Progress Bar
- Next Thread: Retrying the data from database in dynamically



Linear Mode