File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes request object and Filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "request object and Filters" Watch "request object and Filters" New topic
Author

request object and Filters

Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
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.


SCJP | SCWCD | SCBCD | SCWSD 5 | SCEA (I) 1.4 | SCEA 5 | IBM SOA 669
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

You can work with the request object inside of your filters.


A good workman is known by his tools.
Saurabh Chaubey
Ranch Hand

Joined: Oct 16, 2005
Posts: 101
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
shweta bulbule
Ranch Hand

Joined: Mar 24, 2006
Posts: 30
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.


Thanks,<br />Shweta
Steven Colley
Ranch Hand

Joined: Feb 18, 2005
Posts: 290
Right, i was also thinking in this drection..but i got litlle confused after seeing this on the mock.

Tks Marc, Saurabh and shweta.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: request object and Filters