User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jun 2008
Posts: 6
Reputation: insauciant is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
insauciant insauciant is offline Offline
Newbie Poster

plzz help..urgent

  #1  
Jul 3rd, 2008
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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2006
Posts: 1,378
Reputation: masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough masijade is a jewel in the rough 
Rep Power: 8
Solved Threads: 120
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Virtuoso

Re: plzz help..urgent

  #2  
Jul 3rd, 2008
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?
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
Reply With Quote  
Join Date: Jun 2008
Posts: 3
Reputation: itanmoy is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
itanmoy itanmoy is offline Offline
Newbie Poster

Re: plzz help..urgent

  #3  
Jul 20th, 2008
store all jar file which is required for oracle in your web-inf folder. i think u miss it.
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,242
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is online now Online
Code tags enforcer

Re: plzz help..urgent

  #4  
Jul 20th, 2008
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 4:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC