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



Home Answers Viewqa JSP-Servlet Passing value in hyperlink

Have Programming Question? Ask it here!
 
 
 


yogita
Passing value in hyperlink
1 Answer(s)      6 years and a month 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


Advertisement
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 Tutorials/Questions & Answers:
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 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
Advertisements
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 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
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
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
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 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
Problem passing a value from one jsp to another using href
Problem passing a value from one jsp to another using href  first page.jsp <a href="common.jsp?param=<%l.get(k).parentname%>">...);%> since url print a common.jsp?param=Arts but attr return a null value
Problem passing a value from one jsp to another using href
Problem passing a value from one jsp to another using href  first page.jsp <a href="common.jsp?param=<%l.get(k).parentname%>">...);%> since url print a common.jsp?param=Arts but attr return a null value
enable hyperlink
enable hyperlink  How to enable hyperlink
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 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
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 variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
eclips hyperlink - JSP-Servlet
eclips hyperlink  In my myeclipse if hyperlink is provided in any application , it's not working when I deploy it. I also use net at my PC, is there any problem due to IP Address
Call a servlet on click of hyperlink
Call a servlet on click of hyperlink  Call a servlet on click of hyperlink   . request.getContextPath() is used to return...; </head> <body> <h2>Click on bellow hyperlink
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
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
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
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 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
Creating Hyperlink using GWT
Creating Hyperlink using GWT       This example describes the Basics for building the Hyperlink using GWT. The steps involved in Building the Hyperlink are described below
Use of Hyperlink in Swing - Swing AWT
Use of Hyperlink in Swing  Hi, We are developing the UI using the Java Swing and I have to create Hyperlink in the JTable cell so that if the user click on the Hyperlink it will open other window/screen/panel. My Question
retrieve data from database with hyperlink
retrieve data from database with hyperlink  sir....i have one table called 'name' having two values i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....how
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
Java parameter passing
Java parameter passing  What type of parameter passing does Java support
Objective C Message Passing
Objective C Message Passing  What exactly a message passing means in Objective C? and how can i pass a message to a method
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
Reference passing in java
Reference passing in java  plz tell me wat d meaning of refernce in java? for example : Class M(){ N n; } Class N(){ } wats dis meaning
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
How to create a JTable cell containing Image hyperlink?
How to create a JTable cell containing Image hyperlink?  I'm trying... be clickable like an hyperlink. I'm able to load Image using default image renderer. Can somebody explain me how to add hyperlink (mouse listener) for the each
Connecting to Database from a hyperlink in JSP - JSP-Servlet
Connecting to Database from a hyperlink in JSP  How can I connect to database by clicking on a hyperlink in a JSP Page.Can you please give me sample code for that? Thanks, Srinivasa Rao  Hi friend, insert code
hyperlink the pages with diff-2 actions struts - Struts
hyperlink the pages with actions struts  How to make a hyperlink in struts?  a href = "login.do" > Login </a>  hi i would suggest you to learn it from roseIndia Struts tutorials they have
Passing Arguments. - Java Beginners
Passing Arguments.  Hi, im new in doing this passing arguments and calling methods. Can you please see that y im not getting the answer as the question says to do. Thanks Question:Write a method that is passed two arguments
Hide hyperlink using jQuery
Hide hyperlink using jQuery In this tutorial, we will discuss about how to hide hyperlink after clicking it using jQuery. In the below example , a hyperlink "Click here to hide this link" is included in the web page. When we
Passing Parameters - JSP-Servlet
Passing Parameters  Hi I have to pass parameter like such scenario. Please help me on emergent bases. I will be grateful. First Page First Name /**SECOND PAGER upto this page I passed the parameter through query
passing parameters - JSP-Servlet
passing parameters  hi this is my jsp page Reserved By: Conference Hall No: Select Hall Numbers
 

 

 

DMCA.com