Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1142
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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