[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1140
  • Last Modified:

Get HTTP status code in Filter

I am writing a Servlet Filter for my web application.
How can I get the return status code from request / response ?
0
glogin
Asked:
glogin
  • 2
1 Solution
 
Ajay-SinghCommented:
you can use,

response.getStatus()
0
 
gloginAuthor Commented:
No this API in HTTPServletResponse and ServletRespons.
Which "response" ?
0
 
Ajay-SinghCommented:
org.apache.coyote.Response, thats the class you see on the Filter
0
 
nitingautamCommented:
Can you provide any snippet..
Will this also works in WebSphere?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now