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



Home Answers Viewqa JSP-Servlet Important Question

Have Programming Question? Ask it here!
 
 
 


sanjay baniwal
Important Question
5 Answer(s)      2 years and 3 months ago
Posted in : JSP-Servlet


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


Advertisement
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
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
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
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
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
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 - 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
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
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
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
Class AsyncEvent important methods
In this section, you will learn about the important methods of AsyncEvent Class
AsyncContext Interface important methods
In this section , you will get to know about important methods of AsyncContext Interface
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. The most important point about oltp
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
Searching For Important Issues for Writing Articles
Searching For Important Issues for Writing Articles  ... important issues depends on the following things: About what industry do you... naturally have a flair for writing about important issues and attaining major
Why Big Data is important for Enterprises?
is very important in managing the huge set of structured and un-structured... daily. So, its very important for the enterprises for gathering and analyzing.... These information are very important in deciding the business plans. There days Big Data
Important Interview Questions in Core Java
Important Interview Questions in Core Java Core Java refers... is a different. In any interview, a simple question can dooms the possibility of your... important feature of Java? Ans: Yes, It is a platform independent language, able
Most Important Areas of SEO Strategy
In presenting here the most important areas of SEO strategy we must note... and consequently dominate search ranks. Let us introduce ourselves to most important areas of SEO strategy. Relevant Content There is no area as important as content
Question on pooling
Question on pooling  which server supports pooling?Application server or web server
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
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 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
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
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
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   sir plz tell me how can I create a page which is similar to feedback form in which if one option is empty then other option is inaccessible. for example it consists of name address etc. if name field is not filled
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
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
jsp question
jsp question   sir plz tell me how can I create a page which is similar to feedback form in which if one option is empty then other option is inaccessible. for example it consists of name address etc. if name field is not filled
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 eclipes ??!!
Question in eclipes ??!!  Hooole EveryOne I have Question in eclipes !!? Question is : The objectives of this lab are 1.Using the â?? thisâ?? reference. 2.Initializing class objects. 3.Using overloaded constructors
inheritance....please help me friends...!!!... this is important project that i have to do it..
inheritance....please help me friends...!!!... this is important project that i have to do it..   Point ................. #x : int #y : int + Point() + Point(xCoordinate:int, YCoordinate:int) + getX() : int + getY() : int
 

 

 

DMCA.com