i tried assigning a value to a variable and passing the variable in response.sendRedirect. it doesn't work. someone told me it needed a hard coded value to be able to pass something, and not a variable.
i didn't know variables can be passed in forward.... how is that done?
- RequestDispatcher + forward: You want your server to forward the request to another page/servlet etc... - SendRedirect: You send an answer back to the client, which will tell the browser to go to another place.
Joined: Feb 02, 2005
Originally posted by Shuini Gustav:
this doesn't work it outputs null
to check this if it is working try to see the url
of course it should be http://mywebsite.com/toNextUrl.jsp?id=theValueOfId
this working. if not then the url set maybe like this http://mywebsite.com/toNextUrl.jsp?id=