• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

RequestDispatcher Parameters

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic