Two Laptop Bag
The moose likes Servlets and the fly likes servlet URL question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "servlet URL question" Watch "servlet URL question" New topic
Author

servlet URL question

Buk Lau
Greenhorn

Joined: Nov 06, 2002
Posts: 4
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

Joined: Jan 10, 2002
Posts: 56192
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: servlet URL question
 
Similar Threads
cutting-edge features?
The privileged three?
Wife of (Yesterday,Today and Future)
about idempotent?
Using get() and post() together