Originally posted by Shuini Gustav:
I need to redirect my users to a page while at the same time passing one variable.
but response.sendRedirect needs a hardcoded value to pass and can't pass a dynamic one.
what it currently does is:
response.sendRedirect("sample.jsp?temp=1");
now, instead of the value "1", i want to pass a variable
Originally posted by Jherald Lacambra:
Wow long codes..
i only use this and its working fine:
String id = "123";
response.sendRedirect("toNexturl.jsp?id="+id);
Originally posted by Satou kurinosuke:
If you forward the request, you can use setAttribute to put your variable in the request scope, which can easily be retrieved in your JSP.
Originally posted by Shuini Gustav:
this doesn't work
it outputs null
Originally posted by Shuini Gustav:
this doesn't work
it outputs null
jherald
Originally posted by Shuini Gustav:
this doesn't work
it outputs null
Originally posted by Shuini Gustav:
can it also pass more than one variable?
jherald
jherald
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|