pls review my code

pls review my code

View Answers

May 22, 2008 at 7:42 PM

Hi

<%@ page language="java" import="java.sql.*" %>

<%
Connection con = null;
String url = "jdbc:mysql://192.168.10.211:3306/";;
String db = "amar";
String driver = "com.mysql.jdbc.Driver";
String userName ="amar";
String password="amar123";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,userName,password);
try{
Statement st = con.createStatement();
String user=request.getParameter("userid");
String pass=request.getParameter("password");

ResultSet rs=st.executeQuery("select userid,password from login");
while(rs.next()) {
String userid =rs.getString(1);
String passw=rs.getString(2);
if(user.equals(userid) && pass.equals(passw)) {
session.setAttribute("user",user);

%>
<jsp:forward page="LoginSuccess.jsp" />
<%}
else
out.println("Login Failed,Please try Againe");
%>

<%
}
}catch(Exception e1){}
}
catch (Exception e){
e.printStackTrace();
}

%>

------------------------------------------

Read for more information.

http://www.roseindia.net/servlets/









Related Tutorials/Questions & Answers:
pls review my code - Struts
pls review my code  Hello friends, This is the code in struts. when i click on the submit button. It is showing the blank page. Pls respond soon its urgent. Thanks in advance. public class LOGINAction extends Action
pls review my code - Struts
pls review my code  When i click on the submit page i am getting a blank page Pls help me. thanks in advance. public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest request
Advertisements
Pls review my code - Struts
Pls review my code  Hello friends, this is my code in struts action class this page contains checkboxes and radiobuttons also. when i enter the submit it shows me blank page. can anybody solve my problem its urgent. help me
fetch database value to text box based on selected value my code given below pls correct my code
fetch database value to text box based on selected value my code given below pls correct my code  my Code Given below Pls... help me send correct code for me jsp file... <%@page contentType="text/html" pageEncoding
fetch database value to text box based on selected value my code given below pls correct my code
fetch database value to text box based on selected value my code given below pls correct my code  my Code Given below Pls... help me send correct code for me jsp file... <%@page contentType="text/html" pageEncoding
ModuleNotFoundError: No module named 'code-review'
ModuleNotFoundError: No module named 'code-review'  Hi, My Python... 'code-review' How to remove the ModuleNotFoundError: No module named 'code-review' error? Thanks   Hi, In your python environment
Pls send code
Pls send code   I am Mohini Charankar suppose Name="Mohini" Edit Button Click on that I change my Name with "Mohini/" Save it and page refresh After... an error pls send code
pls send code
pls send code   pls send code for set database value into text box based on selected value in struts and jsp   use any database and get its code for getting values from google
ModuleNotFoundError: No module named 'git-code-review'
ModuleNotFoundError: No module named 'git-code-review'  Hi, My... named 'git-code-review' How to remove the ModuleNotFoundError: No module named 'git-code-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'git-code-review'
ModuleNotFoundError: No module named 'git-code-review'  Hi, My... named 'git-code-review' How to remove the ModuleNotFoundError: No module named 'git-code-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'git-code-review'
ModuleNotFoundError: No module named 'git-code-review'  Hi, My... named 'git-code-review' How to remove the ModuleNotFoundError: No module named 'git-code-review' error? Thanks   Hi, In your python
sourse code pls
sourse code pls  customer registration code in java?   Hello Friend, Please visit the following links: http://www.roseindia.net/jsp/javascriptpagerefresh.shtml http://www.roseindia.net/jsp/user-registration-form
pls i need help with my assignment
pls i need help with my assignment  how to write a code that ask the user for the height of the triangle and prints the triangle using * eg if height is 3 it prints * and also using import java.util.Scanner
pls help its eating my time:(
pls help its eating my time:(  hi am new to struts2.0 in my application i have declared a list in static how to get the static list values in my result.jsp??? if i remove the static in the list the result is getting displayed.why
Review
Review  Friends please help e on this How to write java code to display the next question onclicking review button
Solve my code
Solve my code  import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.io.*; public class ChangeDetails extends... is the mistake in this code! This is working only one record doesn't work
pls send me the code for login and register - Java Beginners
pls send me the code for login and register  pls immediately send me the jsp code for login and registration with validation with java bean in mysql database...  Hi friend, This login action code
Problem in my code - Development process
Problem in my code  Plz go thru this code. I want to check login and pwd with database. Backend MsAccess , Table name : Reg , Dsn Name: JJ While executing code am getting 404 error User Name Password
this is my code java - Date Calendar
this is my code java  /* * NewJFrame.java * * Created on 11... NOT modify this code. The content of this method is * always regenerated...; jTextField1.setText(months); #### This My problem jTextField2.setText(days
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's field....  my project has customer registration and company registration........ pls provide me code.. thanx
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??  import javax.microedition.midlet.*; import javax.microedition.lcdui.*; public class add1 extends MIDlet implements
ModuleNotFoundError: No module named 'my-first-code-in-python'
ModuleNotFoundError: No module named 'my-first-code-in-python'  Hi...: No module named 'my-first-code-in-python' How to remove the ModuleNotFoundError: No module named 'my-first-code-in-python' error? Thanks   
ModuleNotFoundError: No module named 'my-first-code-in-python'
ModuleNotFoundError: No module named 'my-first-code-in-python'  Hi...: No module named 'my-first-code-in-python' How to remove the ModuleNotFoundError: No module named 'my-first-code-in-python' error? Thanks   
Form Code To Dispay Webpages On My Site
Form Code To Dispay Webpages On My Site  I want to use a form input box to display different pages on my site depending on the code the user types into the box. example: Producer Code 1234 would bring up Producer 1 page
Not sure whats wrong with my code HELP PLEASE?!?!
Not sure whats wrong with my code HELP PLEASE?!?!  I cant figure out what I am doing wrong in my code can anyone help me out??? Grades ADS_TO_REPLACE_1 function computeGrade( ) { var hw, lab, midt, fin, avg; hw
Small Bug How to solve in my code
Small Bug How to solve in my code  String season=""; pst = con.prepareStatement("SELECT DISTINCT(Season) season FROM specialdates where Regid... +=rs.getString("season") + ","; } in above code seasons +=rs.getString("season
doubt in my program code - Java Beginners
doubt in my program code  i have developed a web browser... the code i developed i can send u to ur mail if u give ur mail id.... It would be good for me to provide you the solution if problem is clear. Plz send code
My Servlet code not working - Development process
My Servlet code not working  HHi, After executing servlet am getting blank screen. Am using weblogic server and Eclipse editor. But jsp is working fine. Steps(what i did ) 1)Created servlet (In eclipse) and export it (saved
anyone willing to look over my code? (java)
anyone willing to look over my code? (java)  package inorder.without.cheats; import java.util.Arrays; import javax.swing.JOptionPane; public class InOrderWithOutCheats { public static void main(String[] args
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
i am unable to identify the error in my code
i am unable to identify the error in my code  class Program { public static void main(String[] args) { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("enter
how can i simplify my java code
how can i simplify my java code  /* Create a program that prompts... Scanner (System.in); String pass=""; int c = 1; int code=0...=Integer.toString(f); String q=Integer.toString(g); String r=Integer.toString
What's wrong with my pagination code in JSP?
What's wrong with my pagination code in JSP?  Dear experts, I've.... Hope someone can advise me how to. Thanks! print("code sample"); <...; print("code sample");   JSP Pagination The given code retrieves
ERROR with my JAVA code - Java Beginners
ERROR with my JAVA code  The error came up in my main method... it wasnt there until i finished my actionListener coding so I dont know how to fix this....it is really stressing me out!! HELP!!! import java.awt.*; import
Please help me to modify my java code from php code
Please help me to modify my java code from php code  i want to covert this php code int java/JSP . if (isset($_POST['orders'])) { $orders...]); $array[] = $item[1]; } } I tried like this (see below JSP code
Please help me to modify my java code from php code
Modify Java code from PHP Code  i want to covert this php code int...]; } } I tried like this (see below JSP code) ... but this is not giving me the exact result as the above PHP code is giving. So please help me to convert
ModuleNotFoundError: No module named 'review'
ModuleNotFoundError: No module named 'review'  Hi, My Python... 'review' How to remove the ModuleNotFoundError: No module named 'review'... to install padas library. You can install review python with following command
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first
Can someone review my script for an apparent parsing error? -it isn't quite finished yet, but I want to fix error first   import java.util.Scanner; class historyquiz{ public static void main(String args
rate and review app iphone
rate and review app iphone  How to rate and review app in iphone
if my database(oracle) connection failure means wat is the code to write in exception ?
if my database(oracle) connection failure means wat is the code to write in exception ?  if my database(oracle) connection failure means wat is the code to write in exception
ModuleNotFoundError: No module named 'ansible-review'
ModuleNotFoundError: No module named 'ansible-review'  Hi, My... named 'ansible-review' How to remove the ModuleNotFoundError: No module named 'ansible-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'critic-review'
ModuleNotFoundError: No module named 'critic-review'  Hi, My... 'critic-review' How to remove the ModuleNotFoundError: No module named 'critic-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'next-review'
ModuleNotFoundError: No module named 'next-review'  Hi, My Python... 'next-review' How to remove the ModuleNotFoundError: No module named 'next-review' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'post-review'
ModuleNotFoundError: No module named 'post-review'  Hi, My Python... 'post-review' How to remove the ModuleNotFoundError: No module named 'post-review' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'review-meta'
ModuleNotFoundError: No module named 'review-meta'  Hi, My Python... 'review-meta' How to remove the ModuleNotFoundError: No module named 'review-meta' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'rgmining-review'
ModuleNotFoundError: No module named 'rgmining-review'  Hi, My... named 'rgmining-review' How to remove the ModuleNotFoundError: No module named 'rgmining-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'wagtail-review'
ModuleNotFoundError: No module named 'wagtail-review'  Hi, My... named 'wagtail-review' How to remove the ModuleNotFoundError: No module named 'wagtail-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'xblock-review'
ModuleNotFoundError: No module named 'xblock-review'  Hi, My... 'xblock-review' How to remove the ModuleNotFoundError: No module named 'xblock-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'critic-review'
ModuleNotFoundError: No module named 'critic-review'  Hi, My... 'critic-review' How to remove the ModuleNotFoundError: No module named 'critic-review' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'ansible-review'
ModuleNotFoundError: No module named 'ansible-review'  Hi, My... named 'ansible-review' How to remove the ModuleNotFoundError: No module named 'ansible-review' error? Thanks   Hi, In your python

Ads