Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC Jdbc Login Page Validation using Combobox

Have Programming Question? Ask it here!
 
 
 


Manjunath.Surpur
Jdbc Login Page Validation using Combobox
0 Answer(s)      3 years and a month ago
Posted in : JDBC


I got Login By this code i want to login by validating with combobox....The link which you send its without combobox.i m unable to get login by verifying with combo box..Ex banglore if i select it need to validate username and pass word with place bangalore....please help me i dont know how to validate the combobox for diffrent cities please help me by validating with combobox....

<form action="authenticateUserServlet" method="POST">
<table>
<tr><td align="left">Username</td><td><input type="text" name="username" size="20"></td></tr>
<tr><td align="left">Password:</td><td><input type="password" name="password" size="20"></td></tr>
<tr><td align="left">Cities:</td><td><select style=width:180px><option value="bangalore">bangalore</option>value="mangalore">mangalore</option><option value="hma">hma</option></select></td></tr>
<tr><td colspan="2"><input type="submit" value="Login"><input type="reset" Value="Cancel" ></input></td></tr>
</table>
</form>

servlets:- 
package myservlets; import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*;

public class authenticateUserServlet extends HttpServlet { @Override public void init(ServletConfig config) throws ServletException { super.init(config); }

protected void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {

response.setContentType("text/html"); PrintWriter pw = response.getWriter(); String name = request.getParameter("username"); String password = request.getParameter("password");

try{ String driver = "org.postgresql.Driver"; Class.forName(driver).newInstance();

Connection con=null; Statement stmt=null;

String url="jdbc:postgresql://192.168.10.32/blrtaxi"; con=DriverManager.getConnection("jdbc:postgresql://localhost:5432/manju","postgres", "password"); stmt=con.createStatement(); String query = "select uname,password from dblogin where uname='"+name+"' and password='"+password+"'"; System.out.println(query); ResultSet rs = stmt.executeQuery(query);

if(rs.next()){

response.sendRedirect("Menu.jsp"); } else{ response.sendRedirect("index.jsp"); } }

catch(Exception e){ System.out.println(e.getMessage()); } } }

I want login username,password and combobox By sessions please help me.... Thanks for reply.

Thanks and Regards Manjunath Surpur


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Jdbc Login Page Validation using Combobox
Jdbc Login Page Validation using Combobox  I got Login By this code i want to login by validating with combobox....The link which you send its...(e.getMessage()); } } } I want login username,password and combobox By sessions
Jdbc Login Page Validation using Combobox
Jdbc Login Page Validation using Combobox  I am beginer to java i am... help me to validate username and password by using combo box..... Please Help Me.... Thanks alot Index.jsp <%@ page language="java" contentType="text
Advertisements
Jdbc Login Page Validation using Combobox
Jdbc Login Page Validation using Combobox  I am beginer to java i am... help me to validate username and password by using combo box..... Please Help Me.... Thanks alot Index.jsp <%@ page language="java" contentType="text
Login page validation on ipad
Login page validation on ipad  I am using userId & password labels and their corresponding textfield. Now I want to validate the details by single sign in button and want to switch on to next page. Used two labels again
login page validation
login page validation  hi could you please send me code for login validations Email validation and password email should be in correct format and valid password in java   import java.awt.*; import javax.swing.
comboBox validation
comboBox validation  dear sir. i want to know . how to validate radio button in struts using xml validation. thanks
login page with mysql using jsp
login page with mysql using jsp  pls i need a sample of login page to check username and password in mysql database. thanks
program code for login page in struts by using eclipse
program code for login page in struts by using eclipse  I want program code for login page in struts by using eclipse
login page using jsp servlrt with mysql database?
login page using jsp servlrt with mysql database?  Description... table login. After successfully login user1 see only index page,if user2 login then he see only visiter page and so on. please gine me any suggession. Thanks
code for user registration page and login page of emails using jsp
code for user registration page and login page of emails using jsp  hiiiiiii please send me the code for user registration page and login page of email using jsp and servlets and also code for database connectivity to oracle
Struts Login Validation. In This code setter of login page is called only one time again it doesnt call it. Why..?
Struts Login Validation. In This code setter of login page is called only one... page..."); log.info("Login page loaded successfully."); return...="com.credentek.recon.sms.action.IndexAction" method="login"> <
struts2.2.1 Login validation example.
struts2.2.1 Login validation example. In this example, We will discuss about the Login validation using struts2.2.1. Directory structure of example...; charset=UTF-8"> <title>Login Validation Example<
login page
login page  code for login page
Login page
Login page  how to create Login page in java
create login page using data from text file
create login page using data from text file  I want to create login page using data store in textfile(data submit from regiter page to textfile) using jsp and servlet. Thanks
login page
login page  pls say how to create a login page in jsp and mysql using netbaens   Hi Friend, Please visit the following links: http://roseindia.net/jsf/netbeans/index.shtml http://roseindia.net/jsp/loginbean.shtml
login form validation - JSP-Servlet
login form validation  hi, how to validate the login form that contains user name and password using post method . the validation should not allow user to login in the address bar thanks regards, anand
Login validation doubt
Login validation doubt  Hi, 1)login.jsp: <%@page import...;% } %> 2)check.jsp: <%@page import="java.sql.*"%> <% String user... = DriverManager.getConnection("jdbc:odbc:student"); Statement st=con.createStatement
login page
login page  hi i'm trying to create login page using jsp. i get no error while compiling but i get 404 while running the index.jsp. And i'm using... the program. Following are my programs... 1.index.jsp <%@page contentType="text
Login Page
Login Page  Can anyone tell me the steps to create a login page in myeclipse 7.0 and validating it with login database in db2 9.7 ??? Please tell me
login page
login page  How to login as different user in php
Login Password Validation iPhone / iPAD
Login Password Validation iPhone / iPAD  HOW TO WRITE A TEST CASE TO SET THE VALIDATION FOR LOGIN AND PASSWORD FIELD IN OBJECTIVE C, IOS.   ...]; //unless you're using ARC } @end   WHAT IS "STAssertTrue
using ajax and jsp (struts) to login and remain on same page.
using ajax and jsp (struts) to login and remain on same page.  I am a fresher... I can forward my login page to success page using struts, but I want to remain on same login page and just want to display loggers name ... I don't
LOGIN PAGE
LOGIN PAGE  A java program with "login" as title,menus added, and a text field asking for firstname, lastname, and displaying current date and time
LOGIN PROBLEM - JDBC
values and special charecters etc, on the data entered. - Using JDBC create... - After submitting the User ID and Password in the login page, forward the control... and special charecters etc, on the data entered. - Using JDBC create a connection
coding for login page
coding for login page  coding for login page
How to prevent from navigating to ck buttonnext page when user reaches login page using back button
goback to user login page using back button and agin click browser forward button...How to prevent from navigating to ck buttonnext page when user reaches login page using back button  Hi sir, I have created 2 pages, 1) Lo gin Page
How to prevent from navigating to a page after reaching Login page using back button?
How to prevent from navigating to a page after reaching Login page using back... login page using back button and agin click browser forward button,the 2nd page.....But i dont want it to happen.Instead,it should again ask for login. I am using
login page code in asp.net
login page code in asp.net  i need front end and backend code for login page in vb asp.net using sql server....having code for submit button
login page in php
login page in php  How to create a login page in php
HTML Login Page Code
JavaScript validation in Login page. We have set username and password value.... HTML Login page with JavaScript Validation <html> <body> <...HTML Login Page Code Here is an example of html login page code
jsp login page
jsp login page  hi tell me how to create a login page using jsp and servlet and not using bean... please tell how to create a database in sql server... please tell with code
html login page with ajax
html login page with ajax  hi all... i want to create a login page using html and ajax for validation is must. please help me doing that with code... and password from the user and check whether the user is valid or not by using ajax
How to set the border in header and footer from login page using swings/awt
How to set the border in header and footer from login page using swings/awt  Hi, How to set the border in header and footer from login page using swings/awt
basic login and registration web page using jsp and servlet without using bean .....
basic login and registration web page using jsp and servlet without using bean .....  Hello Folks please i m totally beginner so guys please help me with very simple solution..... thnx
jsp-oracle validation - JDBC
; } login page User Name...jsp-oracle validation  Dear friends, my validation not takes place... ----------------------------------- loginsuccess.jsp Logout Success login
login page - Java Beginners
login page  I have one login page in jsp that is login.jsp. Now i have validate user from database by another page validate.jsp. but if the user feeded wrong information then i want to print error massege on the first page
login page with image
login page with image  I am writing program for login page.It consists of a image and the login details... how to write a java program using frames that have the default positions in any of the systems.. thanks   i had
Displaying data from combobox on the web page
Displaying data from combobox on the web page  Sir, I have to make a project in which a data from the database is to be displayed in combo box... the database is to be extracted and shown on the same page. Kindly provide me
Displaying data from combobox on the web page
Displaying data from combobox on the web page  Sir, I have to make a project in which a data from the database is to be displayed in combo box... the database is to be extracted and shown on the same page. Kindly provide me
Displaying data from combobox on the web page
Displaying data from combobox on the web page  Sir, I have to make a project in which a data from the database is to be displayed in combo box... the database is to be extracted and shown on the same page. Kindly provide me
Displaying data from combobox on the web page
Displaying data from combobox on the web page  Sir, I have to make a project in which a data from the database is to be displayed in combo box... the database is to be extracted and shown on the same page. Kindly provide me
Displaying data from combobox on the web page
Displaying data from combobox on the web page  Sir, I have to make a project in which a data from the database is to be displayed in combo box... the database is to be extracted and shown on the same page. Kindly provide me
Creating Login Page In JSF using NetBeans
Creating Login Page In JSF using NetBeans  ... illustrates you how to create a login form in JSF using NetBeans. To create the jsp page... and click. 3. Enter JSP File Name (login, for this example) when New JSP File
jsp login page
jsp login page  Hi All, can any one tell me how to create Login page using JSP and Beans. A simple log in page. Please reply ASAP. Thanx, am2085   Hello Friend, Please visit the following link: JSP Login Using
Example of login form validation in struts2.2.1framework.
Example of login form validation in struts2.2.1 framework. In this example, we will introduce you to about the login form validation in struts2.2.1 framework. Our login form validation example does not validate the user against
.Net and SQl 2000 Login page
.Net and SQl 2000 Login page  Please help me creating a login page using dot net using data base sql 2000
JSP-jdbc validation - JSP-Servlet
JSP-jdbc validation  How to validate login email id using JSP, where...; } login page..., login application in jsp function validateForm(theForm
SSL for login page
SSL for login page  I am trying to apply ssl cert to login page only. Does anyone know how to do this on a tomcat web server
HTML login page code
HTML login page code  Hi all, I am writing my first HTML JavaScrip validation page called "UserLogin.html". So, please guide me how to validate user... the complete HTML JavaScript code for User Login Page. Thanks in Advance!   
 

 

 

DMCA.com