Important Question

Important Question

Respected Sir, I am Sanjay Baniwal working in BHEL as a Software Developer as a trainee for One Year. And i have been given a Project in which i have to create a JSP page with a Drop Down List in which all the UserNames in the Account table from SQL Database should come Automatically whenever the JSP page is Requested. Kindly see to it as soon as possible. It's urgent.

Regards Sanjay Baniwal

View Answers

May 2, 2012 at 3:01 PM

<%@page import="java.sql.*"%>
<form method="post" action="../Servlet">
<%
String driver = "com.mysql.jdbc.Driver";
String url = "jdbc:mysql://localhost:3306/register";
String query = "select * from register";
ResultSet rs = null;
Connection conn = null;
Statement stmt = null;
try {
Class.forName(driver);
conn=DriverManager.getConnection(url, "root", "root");

stmt = conn.createStatement();
rs = stmt.executeQuery(query);
%>
<select name="select">
<%
while(rs.next()){
%>
<option value="<%=rs.getInt("id")%>"> <%=rs.getString("username")%> </option>
<%
}
}
catch(Exception e){}
%>
</select>
<input type="submit" value="submit">
</form>

For more information, visit the following links:

http://www.roseindia.net/jsp/user-search.shtml

http://www.roseindia.net/jsp/comboSelect.shtml


May 2, 2012 at 4:52 PM

But sir i do not have the id column in my table than why we are writting getInt"id" in


May 2, 2012 at 4:54 PM


May 5, 2012 at 10:04 AM

Sir, It's been three days that i have not received any answer to my question that why we are writing getInt"id" in our code when i do not have any id column in my Account table.

Please sir reply as soon as possible.

with warm regards.


May 16, 2012 at 10:33 AM

Respected Sir, I think that you did not get my question or you are not interested in answering my question .

Please sir go to my questions as soon as possible.

with Warm Regards Sanjay Baniwal









Related Tutorials/Questions & Answers:
Important Question
Important Question  Respected Sir, I am Sanjay Baniwal working in BHEL as a Software Developer as a trainee for One Year. And i have been given a Project in which i have to create a JSP page with a Drop Down List in which all
Important Java Interview Question
Important Java Interview Question  Complete the Solver constructor so that a call to solveAll return a list with 2 values including the square root and the inverse of the integer passed as parameter. public interface
Advertisements
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
question
question   sir plz tell me what should i give in title box. just i want java program for the question typed in this area
Question
Question   When there is an exception in my program how java runtime system handles
question
question  dear sir/madam my question is how to compare two text format in java..we are java beginners..so we need the complete source code for above mentioned question...we have to compare each and every word
question
question  Dear sir i had some typing mistake at previous question so its my humble request to let me know the steps to start the tomcat6 under the tomcat directory
important
important
question
question  Gud morning sir, I have asked u some question regarding jsp in saturaday for that i didnot find any answere in which u send me the some of the links.U have asked me the specify some details. There is a entity name
Question?
Question?  My question is how to: Add a menu bar to the program with a File menu. In the File menu, add a submenu (JMenuItem) called About. When the user clicks on the About menu item, display a JOptionPane message dialog
ModuleNotFoundError: No module named 'important'
ModuleNotFoundError: No module named 'important'  Hi, My Python... 'important' How to remove the ModuleNotFoundError: No module named 'important' error? Thanks   Hi, In your python environment you
Important things in the Cloud Computing
Important things in the Cloud Computing  Hi, What are the Important things in the Cloud Computing? Thanks   Hi, Here is the list of important things in the Cloud Computing or the important skills necessary for Cloud
important for all beginers
important for all beginers  what is the difference for top down approach and bottom up approach with a example program of source code with clear explanation
Is Python important for finance?
Is Python important for finance?  Hi, I am beginner in Data Science...: Is Python important for finance? Try to provide me good examples or tutorials links so that I can learn the topic "Is Python important for finance?"
Is math important for data science?
Is math important for data science?  Hi, I am beginner in Data...: Is math important for data science? Try to provide me good examples or tutorials links so that I can learn the topic "Is math important for data science
important skills for data scientists
important skills for data scientists  Hi, I am beginner in Data...: important skills for data scientists Try to provide me good examples or tutorials links so that I can learn the topic "important skills for data
Why application server is important?
Why application server is important?  Hi, I have to select the good application server for running my Java based web applications. Which application server or tomcat container is good to run the application. On my website
very important - Kindly help
very important - Kindly help   I am creating web page for form registration to my department ..I have to Reprint the Application Form (i.e Download the PDf File from the Database ) , when the user gives the Application number
The ActionForm and what are important methods in ActionForm.
The ActionForm and what are important methods in ActionForm.  What is the ActionForm and what are important methods in ActionForm
Important - Java Beginners
Important Character into string vaariable  How to store the character... = prabhu.charAt(15); char q = prabhu.charAt(16); char r = prabhu.charAt(17); char... upper16 = Character.toLowerCase(q); char upper17 = Character.toLowerCase(r
ModuleNotFoundError: No module named 'important-words'
ModuleNotFoundError: No module named 'important-words'  Hi, My... named 'important-words' How to remove the ModuleNotFoundError: No module named 'important-words' error? Thanks   Hi, In your python
important topics to prepare for java interview
important topics to prepare for java interview  hi friends can anyone tell what are the important topics to prepare for java interview????   Each and every topic is important for an interview. You can find some
AsyncContext Interface important methods
In this section , you will get to know about important methods of AsyncContext Interface
Class AsyncEvent important methods
In this section, you will learn about the important methods of AsyncEvent Class
AsyncListener Interface important methods
In this section, you will get to know about important methods AsyncListener Interface
What is most important features of Java
What is most important features of Java  Hi, What is the most important features of Java? Thanks   Hi, The latest version of Java 7 having some most important features like Java virtual Machine, Language updates
What is the most important requirement for OLTP ?
What is the most important requirement for OLTP ?   What is the most important requirement for OLTP ?   Hi, In the transaction server..., supermarkets, and manufacturers. ADS_TO_REPLACE_1 The most important point
JPQL helpppppp please very important
JPQL helpppppp please very important   there are 3 tables: book: isbn title loan: isbn borrowerId borrower: borrowerId FirstName LastName I want to write a JPQL Query that show only the Available books and not loaned
Outsourcing: The Most Important Questions - RoseIndia
Outsourcing: The Most Important Questions Introduction Outsourcing work is an important business decision that can make or mar your prospects... of the important components that help you to take the right decisions
important for all final years student
important for all final years student   i need a java program for my project, java program for getting path of the file in console while reading a file it should add page number in all pages after that delete all common letters
important for all final years student
important for all final years student  i need a java program for my project, java program for getting path of the file in console while reading a file it should add page number in all pages after that delete all common words
important for all final years student
important for all final years student  i need a java program for my project, java program for getting path of the file in console while reading a file it should add page number in all pages after that delete all common words
Question on pooling
Question on pooling  which server supports pooling?Application server or web server
Searching For Important Issues for Writing Articles
Searching For Important Issues for Writing Articles  ... important issues depends on the following things: ADS_TO_REPLACE_1 About what... knowledge, you would naturally have a flair for writing about important issues
This question in Jmeter
This question in Jmeter  hi..i want to send request(xml) 100 times but each time in request xml one element needs to change, otherwise request will be failed since its duplicate
Question on javascript
Question on javascript  This is not exactly what i wanted....If i enter in 2nd combobox as name of child then it should show child id in 1st combobox automatically and vice versa
C# question
Create a Solution by name Bank with Classes Account.cs, SavingsAccount.cs and savingsTest.cs to Demonstrate Abstract Classes in C#  1st question : Create a Solution by name Bank with Classes Account.cs, SavingsAccount.cs
question for c++
question for c++   write Program to swap between two numbers if first number is greater than second number and total of two numbers greater than 10
Interview Questions - What are important features of Java?
Interview Questions - What are important features of Java?  Hi, What are important features of Java? Thanks   Hi, Being a popular Object Oriented programming language, Java comes with its most important feature. Its
Inheritance question?
Inheritance question?  Q3)Create a class hierarchy as Company extended by AccountsDepartment. AccountsDepartment extended by AccountsReceivable... as AccountsPayable. please send the code of this question soon....plzzzzzzzz  
Inheritance question?
Inheritance question?  Q3)Create a class hierarchy as Company extended by AccountsDepartment. AccountsDepartment extended by AccountsReceivable... as AccountsPayable. please send the code of this question soon....plzzzzzzzz View
Core Java Interview Question, Interview Question
_TO_REPLACE_3 Question: What is synchronization and why is it important? Answer... Core Java Interview Question Page 12       Question: What is a transient variable? Answer
Question in Eclipse
Question in Eclipse   ** Hello EveryOne , L Have Question in Eclipse ?!! Question is : A.( The square class) Design a class named Square that contains : 1.A private instance variable side of type double 2.A no-argument
Question in Eclipse ??
Question in Eclipse ??  ** Hello EveryOne , L Have Question in Eclipse ?!! Question is : A.( The square class) Design a class named Square that contains : 1.A private instance variable side of type double 2.A no-argument
jsp question..
jsp question..  what should do in deployment descriptor after adding jstl jar files.. I am the the following message in console screen; The absolute cannot be resolved in either web.xml or the jar files deployed
jsp question..
jsp question..  what should do in deployment descriptor after adding jstl jar files.. I am the the following message in console screen; The absolute cannot be resolved in either web.xml or the jar files deployed
Question in Java ??
Question in Java ??   Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number squrfoot
Question in Java ??
Question in Java ??  Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number 0 ,2, . . . ,18,20 squrfoot 00000 1.4142 5.2426 5.4721
Question in Java ??
Question in Java ??  Welcome every One ,I have Q in Java : Write aprogram that print the falewing table using SQRT method in the Math Class? Number 0 ,2, . . . ,18,20 squrfoot 00000 1.4142 5.2426 5.4721

Ads