Hi!!!!
using jsforward u cannot pass the parameers the way u do it in the form .
Because no form is submitted in case of jsp:forward.
But u can set the values of the parameters in the request and response
headers which u can call in the next jsp page.
instaed of this
<jsp:param name="role" value="role1"/>
<jsp:param name="id" value="user1"/>
u can do this
response.setAttribute("variable name","value");
which on the other page u can access as
request.getAttribute("variable name");
simple. Hope this might solve ur problem.
N Hari Babu <[EMAIL PROTECTED]> on 06/30/2000 12:40:15 PM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Kher Tamanna-SWD-ITIL-UB/Itilmail)
Subject: communicate between two jsp's
I need to call one jsp from another jsp also i need to pass two parameters.
For this in the first jsp i am using <jsp:forward> element, also i am
passing two parameters. But in the second jsp i am not able to retrieve
parameters. How can i.
This is the snippet of code.
loginjsp.jsp :(first jsp file)
<jsp:forward page="distjsp.jsp">
<jsp:param name="role" value="role1"/>
<jsp:param name="id" value="user1"/>
distjsp.jsp :(second jsp file)
<%
String role = request.getParameter("role");
String user = request.getParameter("id");
System.out.println("in distjsp user="+user+"type:"+role);
%>
in the second jsp it is retreving null values.
can somebody help me.
TIA,
Haribabu.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets