tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject Re: Mapping servlets to other things that prefix and suffix
Date Fri, 24 Mar 2000 15:10:29 GMT

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-No-Archive: yes
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Jesper Jørgensen <jesper@caput.com>
> To: tomcat-dev@jakarta.apache.org
> Subject: Mapping servlets to other things that prefix and suffix
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> How do I go about setting up a completely traditional servlet repository
> with automatic servlet reloading in tomcat BUT with one big difference:
> 
> I want each servlet to be mapped to a query string parameter instead of
> to a path element or a suffix. Like:
> 
> http://domain.tld/showfolder.jsp?command=openthread&thread=1 Should be
> mapped to the "command servlet" "openthread" which in this case will
> change state of a folder view.

If I understand what you want to do correctly, I would look at a
Request Interceptor to try to do what you want.

The request interceptor could perform the selection by inspection of
the request parameters.

--

In our implementation, although we are not using jsp, we have a 'launch'
servlet which is in essence a request redirector based on request
parameters.

Also, we have a LoginInterceptor that forces users to go through a predefined
login servlet and deals with other things too.

Arieh



> 
> After the "command" servlet has been run, things should proceed as usual
> as if no servlet has serviced the request yet, so that the JSP page
> would be processed afterwards.
> 
> In effect, I am _not_ interested in complying with a standard servlet
> container. I am interested in reusing the code already written in tomcat
> that manages reloading and servicing of servlets to implement an MVC
> controller that dispatches commands.
> 
> Regards,
> Jesper
> -- 
> Jesper Jorgensen         Caput ApS       Tel +45 33 12 24 42             
> jesper@caput.com         Nygade 6        Fax +45 33 91 24 42
> http://www.caput.com     DK-1164 Kbh K
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message