Home Answers Viewqa JSP-Servlet Passing value in hyperlink

 
 


yogita
Passing value in hyperlink
1 Answer(s)      5 years and 2 months ago
Posted in : JSP-Servlet

How to pass value in anchor tag or HTML link from one JSP page to another JSP page ?and how to retrieve values in another..., Retrive value from database Retrive data from database User

View Answers

April 18, 2008 at 7:16 PM


Hi friend,

<%@ page language="java" import="java.sql.*,java.util.*,java.text.*" %>
<html>
<head>
<title>Retrive value from database</title>
</head>
<body>
<h2><font color="#CC3366">Retrive data from database</font></h2>
<table border="0" width="50%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%">
<form method="POST">
<table border="1" width="100%" cellspacing="0" cellpadding="0" bgcolor="#FFE1E1">
<tr>
<td width="50%" valign="right"><b>User ID</b></td>
<td width="50%" valign="right"><b>First Name</b></td>
<td width="50%" valign="right"><b>Last Name</b></td>
<td width="50%" valign="right"><b>Qualification</b></td>
<td width="50%" valign="right"><b>Engineer</b></td>
<td width="50%" valign="right"><b>Docter</b></td>
<%
Connection con = null;
String url = "jdbc:mysql://localhost:3306/";;
String db = "register";
String driver = "com.mysql.jdbc.Driver";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db,"root","root");
try{
Statement st = con.createStatement();
String query = "SELECT * FROM insert_retrive";
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
%>
</tr>
<tr>
<td width="50%" valign="right"><%=rs.getInt("id")%></td>
<td width="50%" valign="right"><%=rs.getString("userid")%></td>
<td width="50%" valign="right"><%=rs.getString("lastname")%></td>
<td width="50%" valign="right"><%=rs.getString("qualification")%></td>
<td width="50%" valign="right"><%=rs.getString("engineer")%></td>
<td width="50%" valign="right"><%=rs.getString("docter")%></td>
</tr>
<%}
out.println("<br/><a href=Insert-and-Retrieve.jsp><b>Home</b></a>");
rs.close();
con.close();

}
catch (SQLException ex){
System.out.println("SQL statement is not executed!");
}
}
catch (Exception e){
e.printStackTrace();
}
%>
</tr>
</table>
</form>
</td>
</tr>
</table>
</body>
</html>

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

read for more information.

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









Related Pages:
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
Passing value in hyperlink - JSP-Servlet
Passing value in hyperlink  How to pass value in anchor tag or HTML......, Retrive value from database Retrive data from database User   Hi...*,java.text.*" %><html><head><title>Retrive value from
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <...-lable"&gt; &lt;Select name="manager"&gt; &lt;option value="" selected&gt;Select&lt;/option&gt; &lt;option value="Ashok
use data from database as hyperlink and pass the data in the hyperlink
data as hyperlink and all the data links are passing the first parameter only. I...use data from database as hyperlink and pass the data in the hyperlink  Hi Friends, I am using the data from database as hyperlink and pass the data
passing value of radio button
passing value of radio button  hi,i have 3 jframe built using the GUi editor in net beans 6.9. i have two radio button in the first jframe.i have to get the selected item appear on the 3rd frame after passing through the second
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
hyperlink
hyperlink  I have a .xls file and i want the code to open this .xls file in read only mode when i click on a hyperlink,it should not not be editable,please send me the code
use data from database table as hyperlink value - JSP-Servlet
to hyperlink. I want to use this data as hyperlink and use it as the value... as the hyperlink's value then pass to the next page and retrieve the complete details of the row...use data from database table as hyperlink value  I'm creating a web
Argument Passing
Passing Argument in Java  hi this is my code class Test { void meth(int i, int j) { i *= 2; j /= 2... and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
Argument Passing
, the method takes the arguments 15 and 20 as a result it multiply the value of a i.e 15 by 2 and divide the value of b 20 by 2 to produce the output 30 and 10
passing value from javascript to jsp - JSP-Servlet
passing value from javascript to jsp  Hi... Is there any way to get the value from the javascript and print it on the current jsp page or print an array onto the current jsp page using javascript  Hi Friend, We
passing value fron script to scriplet - JSP-Servlet
passing value fron script to scriplet  how to pass value from Java..., or use a the name/value query string. your first should look something like: Enter you value here: Then click the button to Check you use
Passing array element
Passing array element  What about passing an element of an array? If I have array of objects and pass functionA(arr[2]); Then functionA() will get arr[2] as a value type or a reference type
passing values on button click
passing values on button click  Please help me to solve this issue.I want to pass a value assigned to button to another view upon button click in xcode
Passing Parameter - JSP-Servlet
Passing Parameter  I would like to ask how to pass a parameter from... this: function change() { var answer = document.getElementById('selc').value; answer<%; <---I'm stuck here passing the var
passing text value from pop up to parent page
passing text value from pop up to parent page  i want to pass value of a textbox of one pop up window to its parent page(html). that parent page contain a table. And i want to pass that text value to one cell in table of parent
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
how to pass the mutiple values from    I am getting the error when passing the values from this way emp2=${employee.lastName1} & name=${employee.firstName.How to pass the values from hyperlink in column
Passing Parameter - JSP-Servlet
Passing Parameter  Hi, it'me again. Below is the set of code that I... = document.getElementById('selc').value; document.getElementById('textvalue').value...').value; window.location.replace("mod1.jsp?name="+answer); } Use of Select
Show Hyperlink in HTML Page
Show Hyperlink in HTML Page       HTML is a HyperTextMarkupLanguage.The HTML uses a hyperlink...;/a>) tag is used for creating a text on which hyperlink is to be displayed
Get specific item details by clicking on hyperlink
and corresponding image with a hyperlink on it from the database to a jsp page. -If I click...;tr><td>Item:</td><td><input type="text" value="<...;/td><td><input type="text" value="<%=rs.getDouble("price")%>">
enable hyperlink
enable hyperlink  How to enable hyperlink
Passing td cell id to servlet
Passing td cell id to servlet  Hi all, I am new to JSP/Servlet .Please help. I need to send the table cell index in servlet using javascript...; </table> <div><input type="submit" value="Move" name="Submit
html input passing to jsp method
html input passing to jsp method  i want code in which jsp method takes html input value which is in same page...... <html> <head> <%!public void method1() { **???how to read pid value here???** }%>
Passing values from child window to parent window.
Passing values from child window to parent window.  http://www.roseindia.net/java/pass-value-example/pass-value-child-to-parent.shtml I have gone thru the link but my requirement is checkboxes.can u please explain
pass a variable(friends name) through a hyperlink in to another jsp.
pass a variable(friends name) through a hyperlink in to another jsp.  hi friends, i am developing a site in jsp. i have some problem,plz tell me... this code: while(resultset.next()) { %> <a href="home2.jsp?value
pass a variable(friends name) through a hyperlink in to another jsp.
pass a variable(friends name) through a hyperlink in to another jsp.  hi friends, i am developing a site in jsp. i have some problem,plz tell me... this code: while(resultset.next()) { %> <a href="home2.jsp?value
Applet - Passing Parameter in Java Applet
Applet - Passing Parameter in Java Applet   ...(<parma name="" value=""></param>) is used... and passing parameter in applet, a example is given below. In this example, we
JavaScript array passing
JavaScript array passing     ... an example of passing array to the methods or functions. When any array object is passed to a method in JavaScript then it is passed by reference not pass by value
Passing Parameter Values to another jsp in Query Strings
Passing Parameter Values to another jsp in Query Strings  HI ALL, I m trying to pass a variable value to another JSP using query string... response.sendRedirect("http://localhost:8080/SWIFT/index.jsp?loginid='"+loginid
passing the form values with image upload - JSP-Servlet
passing the form values with image upload  Hii . I want to get the solution for passing values with an image uploading form. I cant access... : 2. Enter value for field 2: 3. Upload file : and in your servlet you can
JSP:Passing query as parameter - Java Beginners
JSP:Passing query as parameter  Hi Friends, I have a real tough time in finding the solution of a problem. I am here to find a real solution of my... to pass the value of qry1,qry2,qry3... Please help me to find the solution
JSP:Passing query as parameter - Java Beginners
JSP:Passing query as parameter  Hi Friends, I have a real tough time in finding the solution of a problem. I am here to find a real solution of my... to pass the value of qry1,qry2,qry3... Please help me to find the solution
passing textbox value from one page to another page using html n javascript
passing textbox value from one page to another page using html n javascript  on button onclick event pass text box value and i want to pass value...;/td> </tr> <tr> <td colspan=2><input type=submit value
Passing values from child window to parent window.
Passing values from child window to parent window.  Hai, I'm having a requirement ,in that when i open a (pop-up)child window from a parent window... the following link: http://www.roseindia.net/java/pass-value-example/pass-value
passing data from one jframe to another
passing data from one jframe to another  I have two JFrame,built by using the GUI Editor netbeans 6.9.i have to pass a data from a Jtextfield...){ String value=text.getText(); NextPage page=new NextPage(value
Hyperlink on UILabel iPhone SDK
Hyperlink on UILabel iPhone SDK  Hi, I wanted to set a hyperlink on UILabel in my iPhone application. Can anyone suggest me how to do it? Thanks
Passing values in ComboBox from XML file
Passing values in ComboBox from XML file In this tutorial we are going...;center><H1>Passing values in COMBOBOX</h1></center> <center>...;input type="submit" value="Submit" name="B1">
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
passing rs.getString values between the jsp pages using hidden fields
passing rs.getString values between the jsp pages using hidden fields  I want to pass rs.getString values from 1st.jsp to 2nd.jsp using hidden fields like <input type="hidden" value="<%=rs.getString(1
how to get multiple hyperlink values from a table column to another jsp file?
i copy the hyperlink value to that third jsp file "table2", or if you have...how to get multiple hyperlink values from a table column to another jsp file... show the specific details from that hyperlink which was clicked. there are 3

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.