This is a Java servlet filter (as per Servlet API 2.3). This filter lets you clear (eliminate) HTTP query strings in
the incoming requests. With this filter for example two requests like http://your_host/index.jsp?123456 and
http://your_host/index.jsp?78901 will be identical for your index.jsp page.
How to use it: a) download noquerystringflt.jar and save it in WEB-INF/lib b) describe this filter in web.xml. For example:
<filter> <filter-name>NoQueryStringFilter</filter-name> <filter-class>com.cj.noquery.NoQueryStringFilter</filter-class> </filter> c) describe a mapping for this filter in web.xml
<filter-mapping> <filter-name>NoQueryStringFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> and now any incoming request will reach your JSP pages with an empty query string. Technically, API call request.getQueryString() will always return null. For downloading: No Query String filter: noquerystringflt.jar See also JSOS - the largest collection of servlets and filters.
|
Also in JSOS:
|