How to carry multiple values from a Servlet to a JSP?

How to carry multiple values from a Servlet to a JSP?

By using the below code I am able to carry the username to a JSP (single value).

----response.sendRedirect("index.jsp?uname="+username);----

But I want multiple values needs to be carried from my servlet to a JSP. How do I do that?

View Answers

February 28, 2011 at 3:21 PM

You can use the following code:

response.sendRedirect("/examples/jsp/index.jsp?uname="+username+"&&pass="+password);









Related Tutorials/Questions & Answers:
How to carry multiple values from a Servlet to a JSP?
How to pass multiple values from a servlet to JSP?
Advertisements
How to return multiple values from a method - Java Beginners
How to return multiple values from a method - Java Beginners
how to get a values from processRecord - JSP-Servlet
redirect to multiple links from servlet
how to store multiple values from drop down in database where i am using java struts 1.3
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
retrieve multiple columns values from multiple csv files in java
how to get a values from a multipart/form-data - JSP-Servlet
How to get the values from the Combo Box - JSP-Servlet
JSP1
JSP2
Protect JSPs from direct access
how to get multiple hyperlink values from a table column to another jsp file?
calling a javascript function by passing multiple values from applet in web application
getting values from database - JSP-Servlet
Get values from JSP pages - JSP-Servlet
how to get a column values from a excel file after attaching it - JSP-Servlet
select tag multiple values
Facing Problem to insert Multiple Array values in database - JSP-Servlet
How servlet Handles Multiple Request - Java Beginners
multiple select values
How to get a values - JSP-Servlet
How to get a values - JSP-Servlet
ModuleNotFoundError: No module named 'jspp'
ModuleNotFoundError: No module named 'JSPy'
Passing java variables from JSP to Servlet - return null values
retrive values - JSP-Servlet
how to read values from java in xml?
servlet n jsps - Java Beginners
how to insert values from jsp into ms access
How to Display values from databse into table
retrieving values from dynamically added textboxes in jsp - JSP-Servlet
how to fetch data from servlet ????
how to fetch values from .properties to a html file
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file
not able to get values from jsp file - JSP-Servlet
how to store a dynamic values - JSP-Servlet
Values from servlet into dropdownlist in jsp page using ajax
How to values from xml using java?
Displaying Constant values from Interface in JSP - JSP-Servlet
retrieve multiple attribute values
retrieve multiple attribute values
retrieve multiple attribute values
How to create file from input values in Jframe ?
how to get the values to dropdownlist from oracle database
@SessionAttributes multiple values

Ads