Solved

Get HTTP status code in Filter

Posted on 2006-11-17
4
1,132 Views
Last Modified: 2012-08-13
I am writing a Servlet Filter for my web application.
How can I get the return status code from request / response ?
0
Comment
Question by:glogin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Ajay-Singh
ID: 17963491
you can use,

response.getStatus()
0
 

Author Comment

by:glogin
ID: 17963570
No this API in HTTPServletResponse and ServletRespons.
Which "response" ?
0
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 50 total points
ID: 17963647
org.apache.coyote.Response, thats the class you see on the Filter
0
 

Expert Comment

by:nitingautam
ID: 22887528
Can you provide any snippet..
Will this also works in WebSphere?
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question