On Nov 7, 2006, at 4:39 AM, Daniel López wrote: > In fact, it is nothing too fancy, it basically does the same that the > Caucho Proxy Servlet does but it allows you to specify a list of init > parameters that, working in pairs, allow you to specify a recognition > regexp pattern and a replacement pattern. Something like that:
Excellent. I've added it as a bug report. Another enhancement we're looking at for the proxy is to give it the same load-balancing capabilities that the resin load-balancer already uses. Your enhancement looks fairly straightforward. -- Scott > ---- > <filter> > <filter-name>ProxyFilter</filter-name> > <filter-class>org.leaf.filters.ProxyFilter</filter-class> > <init-param> > <param-name>MATCHING_URL_APP_1</param-name> > <param-value>/ca/app/(.*).html</param-value> > </init-param> > <init-param> > <param-name>REPLACEMENT_URL_APP_1</param-name> > <param-value>http://internal.com:9080/html/$1.html</param-value> > </init-param> > <init-param> > <param-name>MATCHING_URL_APP_2</param-name> > <param-value>/ca/app/(.*)</param-value> > </init-param> > <init-param> > <param-name>REPLACEMENT_URL_APP_2</param-name> > <param-value>http://internal.com:9080/app/$1</param-value> > </init-param> > ... > </filter> > ---- > You only need to make sure the mapping of the filter matches all the > requests you want, and the ones that match no criteria from the init > parameters simply pass through the filter untouched. > > Not sure how useful it will be to others, but in our case it works > pretty well as it gets SiteMesh to believe that some remote pages are > local resources, so they get "decorated" appropriately. It is an > intermediate step before we migrate to a real portal solution, but > time > and resources forced us to get something done before schedule. > > Barring some implementation problems when we perform the stress tests, > it is working great for us. > > S! > D. > > > Scott Ferguson escribió: > >> On Nov 6, 2006, at 2:10 AM, Daniel López wrote: >> >> >>> Before we found out about that one, we developed our own >>> ProxyFilter, >>> instead of a servlet, with a bit more complex URL mapping features, >>> using regular expressions. >> >> >> Sounds very cool. We've been discussing the idea of integrating the >> ProxyFilter with the <rewrite-dispatch> tag like we've done for the >> load balancer. >> >> >>> We have done it to be able to integrate some back-end dynamic >>> services >>> with a site driven by SiteMesh, and so far it works pretty well. We >>> have >>> to test it under heavy load yet, as we are still developing it and >>> have >>> not reached that phase. >>> >>> I thought about contributing it back to Resin, the extra regexp >>> based >>> mapping fatures, as I did it for our own OS framework, but I >>> haven't had >>> time to find out if/how Caucho handles contributions and integrate >>> that >>> part into the Resin servlet. >> >> >> A bug report detailing the configuration/features would really be >> great. >> >> The hard part is generally coming up with a good design or >> understanding what applications really need. >> >> --Scott >> >> >>> Cheers. >>> D. > > > _______________________________________________ > 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