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

Ads