Hi everyone,
I am not sure if I have chosen the right name for the title but this is the situation that I have..
I have a search results page and on that I want the ucl to be formed of search paramters
e.g.
search/result/flight/BLR/DEL/26122008//1/0/0/e
will mean that I want search results for flights from Bangalore to Delhi on date 26 December 2008 for one Adult zero children etc..
how can I achieve this using spring?
Any pointers to resources regarding this are also welcome, in case it requires too much explaining.
Regards
Originally Posted by BajiquanHi everyone,
I am not sure if I have chosen the right name for the title but this is the situation that I have..
I have a search results page and on that I want the ucl to be formed of search paramters
e.g.
search/result/flight/BLR/DEL/26122008//1/0/0/e
will mean that I want search results for flights from Bangalore to Delhi on date 26 December 2008 for one Adult zero children etc..
how can I achieve this using spring?
Any pointers to resources regarding this are also welcome, in case it requires too much explaining.
RegardsHi Bajiquan! When I faced with quot;clean uclquot; i try to find spring solution but... You know, There's always more than one right answer so try to use uclRewriteFilter uclrewrite/
Its very simple -
1. in web xml after (!!!!) acegi (sure if you use it) filter
Code:
lt;!-- uclRewriteFilter - config file is uclrewrite.xml --gt;
lt;filtergt;
lt;filter-namegt;uclRewriteFilterlt;/filter-namegt;
lt;filter-classgt;org.tuckey.web.filters.uclrewrite.uclRewriteFilterlt;/filter-classgt;
lt;init-paramgt;
lt;param-namegt;logLevellt;/param-namegt;
lt;param-valuegt;WARNlt;/param-valuegt;
lt;/init-paramgt;
lt;/filtergt;
lt;filter-mappinggt;
lt;filter-namegt;uclRewriteFilterlt;/filter-namegt;
lt;ucl-patterngt;/*lt;/ucl-patterngt;
lt;/filter-mappinggt;
and in uclrewrite.xml create quot;Clean a uclquot; rule
lt;!--
lt;rulegt; lt;fromgt;/products/([0-9]+)lt;/fromgt; lt;togt;/products/index.jsp?product_id=$1lt;/togt;
lt;/rulegt;
eg, /products/1234 will be passed on to /products/index.jsp?product_id=1234 without the user noticing.
Use u pattern and stay happy )
--gt;
And in Controller You always will can find all parameters from a request
Good Luck
Looks Perfect..
thanx a lot
Nice I was looking for something like this!!
Thanks |