And why is it that a servlet filter is "outside the application"? I  
consider it to be part of the application; it is simply a matter that  
those services are not provided directly by the framework used to  
implement the logic.
Otherwise each framework would have to provide that capability.

I have seen both approaches (Cocoon uses the later approach) and both  
have their strong/weak points.

In any case, I don't think there's "a good answer and a bad one".
S!
D.

S'està citant Riccardo Cohen <r...@architectedulogiciel.fr>:

> I understand your point of view : separate url management and
> application logic. It seems a good practice.
>
> In the same time this probably comes from the idea that search engine
> friendly urls are "added" to the application, which basically does not
> need it.
> On one hand it is true. The url "/user/name" is an alias of
> "/servlet?command=showuser&id=1354" in a functionnal point of view.
> On the other hand, you may think of the SEF url as a request by itself,
> and the controller is in charge of handling requests, of any syntax. So
> if my controller parses the url "/servlet?command=showuser&id=1354", why
> couldn't it parse the url "/user/name" instead directly ? This removes
> from the application one level of control and complexity .
>
>
> Am-I right ?
>
>
> Wesley Wu wrote:
>> Not recommended.
>>
>> I think filter should handle this, which is not relative to business logic.
>>
>> 2009/10/30 Riccardo Cohen <r...@architectedulogiciel.fr
>> <mailto:r...@architectedulogiciel.fr>>
>>
>>     Thanks Wesley I'll try to use filter.
>>     Now in term of performance, isn't it better to integrate the url
>>     processing directly into the controller servlet ?
>>
>>     Wesley Wu wrote:
>>      > You may use http://tuckey.org/urlrewrite/ UrlRewriteFilter.
>>      >
>>      > I wrote a similar filter doing the same thing which loads rewrite
>>     config
>>      > from database.
>>      >
>>      > 2009/10/30 Riccardo Cohen <r...@architectedulogiciel.fr
>>     <mailto:r...@architectedulogiciel.fr>
>>      > <mailto:r...@architectedulogiciel.fr
>>     <mailto:r...@architectedulogiciel.fr>>>
>>      >
>>      >     Hello
>>      >
>>      >     I didn't have yet the opportunity to work with search engine
>>     friendly
>>      >     urls with resin (I did it with apache/php). I suppose that
>>     there must be
>>      >     a set of <servlet-mapping> and <rewrite-dispatch> in conf and
>>     some
>>      >     url-dedicated servlets in the application.
>>      >
>>      >     I wonder if there is any kind of "good practice" with resin
>>      >     configuration to build SEF web sites.
>>      >
>>      >     In the wiki I found rewrite rules for php CMS, but not for
>>     java apps.
>>      >     (I use resin 3,2,0)
>>      >
>>      >     Thanks a lot.
>>      >     --
>>      >     Riccardo Cohen
>>      >     Architecte du Logiciel
>>      >     http://www.architectedulogiciel.fr
>>      >     +33 (0)6.09.83.64.49
>>      >     Membre du réseau http://www.reflexe-conseil-centre.org
>>      >
>>      >
>>      >
>>      >
>>      >     _______________________________________________
>>      >     resin-interest mailing list
>>      >     resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>>     <mailto:resin-interest@caucho.com <mailto:resin-interest@caucho.com>>
>>      >     http://maillist.caucho.com/mailman/listinfo/resin-interest
>>      >
>>      >
>>      >
>>      >
>>     ------------------------------------------------------------------------
>>      >
>>      > _______________________________________________
>>      > resin-interest mailing list
>>      > resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>>      > http://maillist.caucho.com/mailman/listinfo/resin-interest
>>
>>     --
>>     Riccardo Cohen
>>     Architecte du Logiciel
>>     http://www.architectedulogiciel.fr
>>     +33 (0)6.09.83.64.49
>>     Membre du réseau http://www.reflexe-conseil-centre.org
>>
>>
>>
>>
>>     _______________________________________________
>>     resin-interest mailing list
>>     resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>>     http://maillist.caucho.com/mailman/listinfo/resin-interest
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> resin-interest mailing list
>> resin-interest@caucho.com
>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
> --
> Riccardo Cohen
> Architecte du Logiciel
> http://www.architectedulogiciel.fr
> +33 (0)6.09.83.64.49
> Membre du réseau http://www.reflexe-conseil-centre.org
>
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>



----------------------------------------------------------------





_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to