• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet URL question

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When submitting a form to a servlet, I process the input parameters and then use:
rd = getServletContext().getRequestDispatcher(URL);
rd.forward(request, response);
to forward to the appropriate jsp page.
I notice that other websites (in general) have the parameter values in the URL, like www.dictionary.com:
http://dictionary.reference.com/search?q=servlet
I am using Tomcat 4.1.29 and it doens't do that. Does Tomcat have a setting to turn this on? If so, why would I want to turn it on (and why would I not want to use it?
Thanks in advance,
Buk
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has nothing to do with a Tomcat setting. It has to do with the method by which the form is posted. A method of POST will pass the params as part of the request; a method of GET will pass in the query string portion of the URL.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic