Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RequestDispatcher Parameters

 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Supposes i m passing a query string to a RequestDispatcher....
and the request object contains a parameter with the same name as a parameter in query String..
So which parameter (Query String/Request) would be overwritten by the other..?

RequestDispatcher rd = context.getRequestDispatcher("/abc.jsp?myparam=aaa");
rd.include(request, response);
the myparam Parameter is also paramter in request
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No it will append the parameter values to the array of String... The first index of the parameter will be "aaa", and the second and so on will be parameter values from the request... You can use getParameterValues method of the request... But if you use getParameter method, the string on the first index will be returned...

Hope you are clear...
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what will be in the first index of array ..the POST attribute or the GET...
as we should know which attributs are stored first in the array GET or POST...
Thanx Naing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic