pass a variable(friends name) through a hyperlink in to another jsp.

Ads
 

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 the solution.

problem: in the welcome page where friends name is show i write this code:

while(resultset.next())
{
%>
<a href="home2.jsp?value=friend_name1">
<%=resultset.getString("first_name") %></a>
<% String friend_name1=resultset.getString("first_name"); %>
<%System.out.println(friend_name1);%>
<%}

by this code user friends is shown,and make a link,when i click on a friends name for showing friend profile, there is a error,by this error profile is not showing, i found this error,profile is not showing bcoz when i click on a friends name,all friend name is passed in to the next page,but i want to pass a specific friend name which i was clicked,plz tell me how i do this?

thanks.

View Answers

Ads









Related Tutorials/Questions & Answers:
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 the solution. problem: in the welcome page where friends name is show i write
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 the solution. problem: in the welcome page where friends name is show i write
Advertisements
How to pass javascript variable in Scriplet of JSP?
How to pass javascript variable in Scriplet of JSP?  How can I assign the value of a javascript variable to a variable declared in jsp scriplet? Is it possible
How to pass variable from one class to another in java
How to pass variable from one class to another in java  How to pass variable from one class to another in java?   Example: public class... and variable through by calling Class1 getter methods
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <...;script src="js/AdminHeader.js"&gt;&lt;/script&gt; &lt;jsp:include page="/jsp/admin/Adminmenu.jsp" &gt; &lt;/jsp:include&gt
use data from database as hyperlink and pass the data in the hyperlink
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... and display tag property I have displayed a column data as hyperlink. I want to pass
JSP Variable in Javascript
you to pass jsp variable to javascript. The JavaScript include a function... are going to pass the jsp variable to javascript. You can see in the given example... JSP Variable in Javascript   
you pass a variable by value.
you pass a variable by value.  How do you pass a variable by value?   Hi friends, Just like in C++, put an ampersand in front of it, like $a = &$b /*--------------Pass By value----------------*/ function add
How to pass parameter through drop down list using session management in jsp??
How to pass parameter through drop down list using session management in jsp??  How to pass parameter through drop down list in the URL and access it on same jsp page using session management
how to get multiple hyperlink values from a table column to another jsp file?
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 another way in JSP please share. these are my codes: ***index.jsp*** <html>
how to pass variable from simple java main class(not servlet) to the jsp page?
how to pass variable from simple java main class(not servlet) to the jsp page?  I have a simple Java class in which I invoke a call to a JSP page, by launching a browser. I have this part working, but now I want to pass variables
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
how to value of one variable pass in other variable in revetse order
how to value of one variable pass in other variable in revetse order  Like variable a=367 b must have valuev763
Passing Parameters to Another JSP Page
Passing Parameters to Another JSP Page      By using the include action we can pass the parameters to another jsp page..." > <jsp:param name="name2" value="James"
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
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... even though some values* stored in the variable loginid. Can any one suggest
Pass a dom object from jsp to servlet
Pass a dom object from jsp to servlet  I am creating a dom object in my jsp page. now i want to pass that object in a servlet through calling servlet in jsp. can anyone help me
Parent child windows relationships when webpage is accesssed through a hyperlink.
the same webpage is accesssed through a hyperlink the time out functionality... is accessed through a hyperlink...Parent child windows relationships when webpage is accesssed through
JSP Create Variable
JSP Create Variable          JSP Create Variable is used to create a variable in jsp. The scriptlets include a java code to be written as <%! %>
how to pass a string from one class to another
in " + name); System.out.println (name); // System.out.println("Another Class...how to pass a string from one class to another  hi all, Good morning. I am trying to develop a coding pass a string from one class and declare
how to change password into one jsp to another jsp
how to change password into one jsp to another jsp  i have two jsps in one jsp i give one password and confirm password, in another jsp i want change my password compare with 1st jsp how to write code please give me answer?  
Pass values from form to form
Pass values from form to form       Java program to pass values from one form to another form in JSP There are many occasions when the programmer need to pass some value to many
calling one jsp from another jsp page
calling one jsp from another jsp page  need coding for calling one jsp from another jsp including the xml file.Its urgent
database through jsp
database through jsp  sir actually i want to retrieve the data from... are there in the database? thanks   Here is an example of jsp which retrieves data from...;html> <body> <br><br> <form method="post" name="form">
Extracting variable from jsp
Extracting variable from jsp  how to Write a java program which...; <body> <form name="userform" method="post" action="excelFile.jsp"> <table> <tr><td>Enter First Name:</td><td><
Pass cookie from one site to another within the same domain
Pass cookie from one site to another within the same domain  Hi, I want to pass a cookie from one website to another within the same domain. This is just to identify whether the same user is logged in or not. Can anyone help me
jdbc connectivity through jsp
jdbc connectivity through jsp  my code: <%@ page language="java... org.apache.jasper.JasperException: An exception occurred processing JSP page /mypage.jsp...) org.apache.jsp.mypage_jsp._jspService(mypage_jsp.java:105
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
How to pass an arraylist from servlet to jsp?
How to pass an arraylist from servlet to jsp?  Hello, Can anyone please tell me how to pass an arraylist from servlet to jsp? I have two arraylist... servlet to jsp? Thanks in advance
How to pass multiple values from a servlet to JSP?
How to pass multiple values from a servlet to JSP?  hi, I want to pass multiple values form a servlet to JSP. Hw do i do that? I am able to send one value at a time without any prb, but I am unable to carry multiple (from two
i want to pass Javascript value to JSP scriptlet..
i want to pass Javascript value to JSP scriptlet..  i am having a problem that, i am having a combo box in the JSP page when i select an item from... now i want to pass this value to JSP scriptlet

Ads