| Article: |
Writing Servlet 2.3 Filters | |
| Subject: | How do i get the name/url of the resource being requested in the doFilter method of the filter. | |
| Date: | 2002-10-28 03:29:28 | |
| From: | anonymous2 | |
| How do i get the name/url of the resource being requested in the doFilter method of the filter. | ||
Showing messages 1 through 1 of 1.
-
How do i get the name/url of the resource being requested in the doFilter method of the filter.
2003-06-04 01:22:36 anonymous2 [View]



String url = new String( hreq.getRequestURL() );
// This however excludes all the parameters.
// You can use this to get them:
java.util.Enumeration params = hreq.getParameterNames();
while ( params.hasMoreElements() ) {
String param = ( String )params.nextElement();
String value = hreq.getParameter( param )
}
// JTR