2010/4/28 Scott Ferguson <f...@caucho.com> > Steffen Busch wrote: > > > > Thanks Scott, the reference page is very useful. > > But I haven't found a 4.0 feature for the 3.1 <match> tag which is > > described here http://caucho.com/resin-3.1/doc/rewrite-tags.xtp#match > They're children of the dispatch tags, basically all the <resin:If*> tags: > > <resin:Dispatch ...> > <resin:IfNetwork .../> > </resin:Dispatch> > > The dispatch tags have two kinds of children: qualifiers (match), and > filters. The filters are servlet filters that should wrap the servlet > request/response objects before the dispatch is taken. >
Well, I use <match> for this reason mentioned in the 3.1 docs: Judicious use of <match> will provide better performance in situations where there are many rules and some of them contain when<http://caucho.com/resin-3.1/doc/rewrite-tags.xtp#when> or if <http://caucho.com/resin-3.1/doc/rewrite-tags.xtp#if> conditions. With Resin 3.1 for example like this: <match regexp="^/homepage"> <moved-permanently regexp="^/homepage/00/00_00_00_content.html" target="/news.jsp"/> <moved-permanently regexp="^/homepage/00/00_00_content.html" target="/"/> <moved-permanently regexp="^/homepage/00/00_00_frame.html" target="/"/> <moved-permanently regexp="^/homepage/00/00_01_01_content.html" target="/login.jsp"/> <moved-permanently regexp="^/homepage/00/00_01_content.html" target="/"/> <moved-permanently regexp="^/homepage/00/00_01_content_top.html" target="/"/> <moved-permanently regexp="^/homepage/00/00_01_frame.html" target="/login.jsp"/> <moved-permanently regexp="^/homepage/00/00_01_navi.html" target="/"/> <moved-permanently regexp="^/homepage/00/ssl_info.html" target="/ssl.jsp"/> <moved-permanently regexp="^/homepage/01/01_01_01_content.html" target="/news.jsp"/> <moved-permanently regexp="^/homepage/01/01_01_content.html" target="/news.jsp"/> <moved-permanently regexp="^/homepage/01/01_01_frame.html" target="/news.jsp"/> <moved-permanently regexp="^/homepage/01/01_02_01_content.html" target="/"/> <moved-permanently regexp="^/homepage/01/01_02_content.html" target="/"/> <moved-permanently regexp="^/homepage/01/01_02_frame.html" target="/"/> ... </match> or this <match regexp="^/redirect.jsp"> <moved-permanently target="/new-target-1.jsp?"> <when query-param="to" regexp="06/06_02_02_frame.html"/> </moved-permanently> <moved-permanently target="/another-page-2.jsp?"> <when query-param="to" regexp="06/06_03_02_frame.html"/> </moved-permanently> ... </match Trying to achieve the first example with 4.0 based on your suggestion and missing examples from current documentation, it does not work: WEB-INF/resin-web.xml:5: 'QName[resin:{urn:java:com.caucho.resin}Forward]' is an unknown field or annotation 3: 4: <resin:Dispatch regexp="^/homepage"> 5: <resin:Forward regexp='^/homepage/00/00_00_00_content.html' target='/news.jsp'/> 6: </resin:Dispatch> 7: > > > > > > Also, with 3.1 it was possible to distinguish the HTTP Code for > > redirects. For Search-Engine-Optimization a 301 (Moved Permanently) is > > in particular cases better than 302 (Found). In 3.1 there is > > <moved-permanently> > http://caucho.com/resin-3.1/doc/rewrite-tags.xtp#moved-permanently > > to achieve this but I have not found equivalent configuration tag in > > 4.0 documentation, there is only > > http://caucho.com/resin-4.0/admin/reference.xtp#resin:Redirect > You can use the <resin:SendError code="302"/> for any of the codes. We > can add a special case for moved-permanently; it's pretty easy to add > new tags. > I would appreciate this. This resin 3.1 configuration for instance <moved-permanently regexp="^/old.jsp" target="/new.jsp"/> does not work for me in 4.0 with the <resin:SendError> together with <resin:Forward> WEB-INF/resin-web.xml:5: 'QName[resin:{urn:java:com.caucho.resin}SendError]' is an unknown field or annotation 3: 4: <resin:Forward regexp='^/old.jsp' target='/new.jsp'> 5: <resin:SendError code="302"/> 6: </resin:Forward> 7: -- Steffen > > -- Scott > > > > > -- Steffen > > > > > > -- Scott > > > I've found this > > > page http://caucho.com/resin-4.0/admin/http-rewrite.xtp but there > is > > > nothing that explains <resin:Dispatch> for example. > > > > > > Finally, I found this > > > page http://caucho.com/resin-4.0/admin/http-rewrite-ref.xtp > > where it's > > > possible to click on <resin:Dispatch> but the only thing I get is a > > > JavaDoc :-( very bad, no examples. > > > > > > Still haven't found web-app or host configuration. > > > > > > -- Steffen > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > 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 <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 > > > > > > _______________________________________________ > 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