Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

problems with get status code from servlet response

Thread view: 
Michelle X. - 05 Jul 2005 23:40 GMT
I am trying to create a filter that logs any request for a invalid url.
So in my filter, I need to exam any servlet response to see if it
contains status error code 404.  But I couldn't find any methods to
get the content of the response such as status line, seem like
HttpServletResponse class only provides ways to change response instead
of looking into the response.
William Brogden - 06 Jul 2005 16:04 GMT
> I am trying to create a filter that logs any request for a invalid url.
>  So in my filter, I need to exam any servlet response to see if it
> contains status error code 404.  But I couldn't find any methods to
> get the content of the response such as status line, seem like
> HttpServletResponse class only provides ways to change response instead
> of looking into the response.

I suppose you could create an extension of HttpServletResponseWrapper
that overrides sendError methods and lets the filter see what has been set.
Bill
Andrea Desole - 06 Jul 2005 16:47 GMT
> I am trying to create a filter that logs any request for a invalid url.

Wouldn't it be a better solution to log everything in the 404 page? You
can do that with the error-page element in the web.xml


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.