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

I want solution for this jsp program..

I want solution for this jsp program..

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %>

JSP Page

<%! String dbusername; String dbpassword; %>

 <%


    String username=request.getParameter("username");
    String password=request.getParameter("password");

     out.println(username);
     out.println(password);


    Connection con=null;
    Statement  stmt=null;
    PreparedStatement pstmt=null;
    ResultSet rs=null;


   try
     {


      String driver="oracle.jdbc.driver.OracleDriver";
      Class.forName(driver);


      con= DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle");





        String dbQuery="select * from Login";
        stmt=con.createStatement();



        rs=stmt.executeQuery(dbQuery);


        dbusername =rs.getString("username");
        dbpassword =rs.getString("password");



    if(rs.next())
    {
    if((username.equals("dbusername") && password.equals("dbpassword")))
    {
         session.setAttribute("username",dbusername);

         response.sendRedirect("Home.jsp");
    }
    else
    {
        response.sendRedirect("Error.jsp");

    }
    }
 }
 catch(Exception e)
 {
 }

    %>

View Answers









Related Tutorials/Questions & Answers:
I want solution for this jsp program..
I want solution for this jsp program..   <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ page import="java.sql.*" %> JSP Page <%! String
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... for particular jsp pages? If we want to develop any jsp pages using eclipse where we can
Advertisements
I want this jsp answers
I want this jsp answers    How can we declare third party classes and interfaces inside our jsp page? How can we declare and definr global variables... for particular jsp pages? If we want to develop any jsp pages using eclipse where we can
when I run exiting project that time I got error, I want solution on it?
when I run exiting project that time I got error, I want solution on it?  Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start
i want to pass Javascript value to JSP scriptlet..
i want to pass Javascript value to JSP scriptlet..  i am having a problem that, i am having a combo box in the JSP page when i select an item from... now i want to pass this value to JSP scriptlet
I want design samples for JSP project
I want design samples for JSP project  Sir, I world Like to do a project in jsp techonology. But i have no idea of selecting the project, especially if i selected any project i have no idea that is how to build ie how to design
I Want to take mqsyl batabase backup using jsp
I Want to take mqsyl batabase backup using jsp   I was develop web portal using jsp and servelt. I need to take backup my MySQL database and restore... path=%path%;C:\Program files\MySQL\MySQL Server 5.0\bin; mysqldump -uroot -proot
jsp solution
jsp solution  Can you tell me i am ri8 now develop application eclipse where i suppose to create java file i know that jsp file will be put in web content folder... 2 nd que i had show many demo in you tube package (like folder
i want to do a project using jsp and servlet....What are all the materials i need to study
i want to do a project using jsp and servlet....What are all the materials i need to study   i want to do a project using jsp and servlet....What are all the materials i need to study ?   Please visit the following
I want to display 10,000 records in a jsp page.Can I display page by page?
I want to display 10,000 records in a jsp page.Can I display page by page?  When I submit a form it says "ERROR: Query request too large. Total rows... print page by page or have say 900 records per page in a jsp? Should I have
A program solution needed
A program solution needed   I need a solve for this problem please ! a program that displays grade statistics. The program should read any number of grades (up to 100) and ends when the user enters -1, the program should reject
jsp solution - JSP-Servlet
jsp solution  how to display javascript value in current jsp page without refreshing page.. dont want alert... got value in 1 variable in javascript and want to print in current jsp page  Hi Friend, You can use Ajax
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session   sig
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out
sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out  sir/mam i want to have knowledge on live projects of java/jsp/servlets.Can you plz help me out.I want to have a through knowledge
i want to store dynamic number of value on one jsp and retrieve them on other.
i want to store dynamic number of value on one jsp and retrieve them on other.  in my problem, i want to run a query from database.then while in loop... are being created in result loop. i.e while(rs.next){}. i want to store
i want to update values
i want to update values  in my form i have 2 submit buttons one... database and it need to insert automatically in to disabled text boxs and once i press the edit button all text boxs need to enable so that i can edit my details
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session
i want code of signing off from a account how its done in jsp and servlet by using either cookies or session   sig   Hi Friend, Please visit the following link:ADS_TO_REPLACE_1 http://roseindia.net/jsp/bank.shtml
I want to learn maven
I want to learn maven  Hi, I have to work on the maven based projects in my company. So, I want to learn it in 5-6 days. How to start learning Maven? Can I learn Maven in 5-6 days. Thanks
Hi, I'm new to JSP I want to create 3 dropdown list each depend on the other and get the options from the database using JSP
Hi, I'm new to JSP I want to create 3 dropdown list each depend on the other and get the options from the database using JSP  as i said i want... the database using JSP. like country,state,city..please guide me
i want to learn Jquery
i want to learn Jquery  i want to learn jquery can u plz guide me   Yes, you can learn these technologies by yourself. Go through the following links: Ajax Tutorials JSON Tutorials JQuery Tutorials
i want for statement codding
i want for statement codding  what is the for condition following out put 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
i want code for these programs
i want code for these programs   Advances in operating... available and suitable platform) Design, develop and execute a program using any... with that upper limit. Rewrite above program such that the processes instead of threads
I want to learn maven
I want to learn maven  Hi, I have to work on the maven based projects in my company. So, I want to learn it in 5-6 days. How to start learning Maven? Can I learn Maven in 5-6 days. Thanks   Hi, First of all I would
Want solution to get values for xml namespace tags from database in java
Want solution to get values for xml namespace tags from database in java  hi I have written a code in java to get these xml tags < company comp:loc=" "/> now i need to get values from sql database for values in the blank
i want to display where i entered values to same page
i want to display where i entered values to same page  hi friends !! i have a values from jsp page .and i want to store that values into DB at the same time i want to show immediatlly on same jsp page with tabular format
i want to display where i entered values to same page
i want to display where i entered values to same page  hi friends !! i have a values from jsp page .and i want to store that values into DB at the same time i want to show immediatlly on same jsp page with tabular format
i want to learn data science
i want to learn data science  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: i want... can learn the topic "i want to learn data science". Also tell me
i want to learn machine learning
i want to learn machine learning  Hi, I am beginner in Data Science and machine learning field. I am searching for the tutorials to learn: i want... so that I can learn the topic "i want to learn machine learning"
program of java - JSP-Servlet
program of java  hi friends... i hv faced a problem of jsp code.my problem is... i want to extract data from dropdown menu to the next jsp page..... and also i want to generate a serial no and with this serial no , i want
Jsp program
Jsp program  A sample program of jsp using dml quaries
I want complete tutorial on advanced java
I want complete tutorial on advanced java  I am studying advanced java like servlets, JSP's RMI EJB's JDBC & all stuff like this i want some tutorial file so that i can download it & read can anyone help me?   
A Java Program by using JSP
A Java Program by using JSP  how to draw lines by using JSP plz show me the solution by using program
i want print the following out put
i want print the following out put  Hello sir i want the following out put can u provide the program in c# o/p; HELLOLLEH HELLLEH HELEH HEH H (adsbygoogle = window.adsbygoogle || []).push
i want to remove specific node in xml file
i want to remove specific node in xml file   <A> <B>hi <C>by <A> <B>hellow <C>how r u ? i want to delet node which is == hellow using java program please help me . tanks in advance
i want to create dynamic calendar in java
i want to create dynamic calendar in java  i want code and explanation
i want display integer number in a string of statement
i want display integer number in a string of statement  i want display integer number in a string of statement
i want to create dynamic calendar in java
i want to create dynamic calendar in java  i want code and explanation
I want to learn Hibernate tutorial quickly
I want to learn Hibernate tutorial quickly  Hello, I want to learn Hibernate tutorial quickly. Is there any way.. I want to learn Hibernate online.. Please help
I want detail information about switchaction? - Struts
I want detail information about switch action?  What is switch action in Java? I want detail information about SwitchAction
same thing i want but from db..
same thing i want but from db..  http://www.roseindia.net/tutorial/javascript/dynamicCombo.html same thing i want but from db
I want example of Control Statement in Java
I want example of Control Statement in Java  Hi, I want answer of control statements in java with example? Thanks   Hi, Control statement in Java is used to control the flow of execution of program. Here
jsp program - JSP-Servlet
jsp program  1.write a servlet program that finds out the given... an application in jsp to redirect the request to any other page.  Hi Friend...=Integer.parseInt(input); int i = num; int number=0,remainder; while(num > 0

Ads