Hey Guys, I had a question regarding Tomcat configuration. I see over and over folks building web apps that write custom code responsible for baking in URL parameters to some path. For example, let's say I have a web service located at:
http://myhost/books that by default returns a listing of books in my book store in JSON format (format not important, but I just picked one to illustrate). The web service is just backed by a Java Servlet, and I know how to use Tomcat's web.xml file, or a context.xml file for example to configure the url path to my servlet and to my web application to set up the above situation. However, what I don't know how to do in Tomcat is to solve (by configuration), the following scenario. Let's say in the above example, my books have categories, like "fiction", "drama", "programming", "science", etc., and that the way I get my JSON listings from the web service in the above example is to pass a special request parameter called "category", and set its value equal to the requested category, like: http://myhost/books?category=fiction To get fiction books, for illustration. What I would like to be able to do is to set up, via configuration, the ability to map a new URL, say: http://myhost/fictionbooks To http://myhost/books?category=fiction In effect, creating a default URI mapping. Is there a way in Tomcat to do this via configuration, and if not, I'm interested in contributing it, and any recommendations on the best places to look to do so would be sincerely appreciated. Thank you. Cheers, Chris ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: chris.a.mattm...@nasa.gov WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org