• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Unable to use forward option with parameters

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am having a problem in forwarding the request to a new jsp source, when i am using the <jsp:forward> option with parameters. here is the source code of the page which i am passing to a new jsp source with parameter.
<%@ page language="java" buffer="8kb" %>
<%!
int i = 1;
String err_msg;
%>
<% err_msg = "A Sample Jsp Page";
if (i == 1) {
%>
<jsp:forward page="Error.jsp" >
<jsp aram name="param1" value="<%= err_msg %>" />
</jsp:forward>
<%} %>

And here is the source jsp page ---
<%
String err_msg = request.getParameter("param1");
%>
<%= err_msg %>
The output i am getting is null instead of "A sample Jsp page".
Please help me in this regard.
Thanks in anticipation.
Regards
Sridhar
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this -
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic