• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet URL question

 
Buk Lau
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic