when i am trying to send a parameter from one jsp page to another jsp page, it is not picking up the passed value
What is wrong with my code:
1) 1.jsp
<html>
<body>
<jsp:forward page="2.jsp" >
<jsp:param name="yyy" value="xxx" />
</jsp:forward>
</body>
</html>
2) 2.jsp
<html>
<body>
<%
out.println("<b>Employee</b>"+ request.getParameter("yyy"));
%>
</body>
</html>
it is displaying the output as "Employeenull". Pl. let me know
-
JSP forward tag (2 messages)
- Posted by: shailender rawat
- Posted on: November 18 2000 01:18 EST
Threaded Messages (2)
- JSP forward tag by ram kumar on November 22 2000 08:19 EST
- JSP forward tag by Dipes Biswas on December 02 2000 03:50 EST
-
JSP forward tag[ Go to top ]
- Posted by: ram kumar
- Posted on: November 22 2000 08:19 EST
- in response to shailender rawat
hi
your code is right but make sure that you server supports JSP1.1..b'coz i think <jsp:forward> tag along with params is JSP1.1 standard..so if you server doesn't support JSP1.1 then u go for JSP1.0 and change the program.so use
<% response.sendRedirect("xx.jsp?name="hell" & value="yes"); %>
otherwise you can do this also
<jsp:forward page="xx.jsp?UID=0 & key="99"" />
ok i prefer the first one
i hope this should work for..all the best
hey bytheway which server do u use to run your JSPs
bye
ram -
JSP forward tag[ Go to top ]
- Posted by: Dipes Biswas
- Posted on: December 02 2000 03:50 EST
- in response to shailender rawat
Hi Rawat,
your code is correct. but if you are using JSWDK 1.0.1, this won't work. with WebLogic 5.0.1 or JRun 3.0 this code will work.
if you are using JSWDK, use the <jsp:forward .. > tag according to JSP 1.0 specification.
just check if it works.
thanx.