Forums Register Login

request object and Filters

+Pie Number of slices to send: Send
Hi ,

i got this answer from a mock ..

"We *CANNOT* work *directly* with "request object" that is passed as parameter to the filter" - FALSE.

is that correct? i mean..is it even false?

Tks.
+Pie Number of slices to send: Send
You can work with the request object inside of your filters.
+Pie Number of slices to send: Send
Hi Felipe,
Marc is right.you can work or manipulate the request and response objects inside your filters.Moreover you can even create your own versions of request and response objects by wrapping them inside corresponding wrappers i.e. HttpServletRequestWrapper and HttpServletResponseWrapper.

Regards,
Saurabh
+Pie Number of slices to send: Send
the whole purpose of filter is to manipulate on your request n response object...else just for the logging sake, it looks useless to take so much pain.
+Pie Number of slices to send: Send
Right, i was also thinking in this drection..but i got litlle confused after seeing this on the mock.

Tks Marc, Saurabh and shweta.
today's feeble attempt to support the empire
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 571 times.
Similar Threads
Question about pageContext Attributes
Can I "cut" the chain in the filter?
session object = null?
Session Utility class
about implicit JSP objects
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:30:04.