Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Get HTTP status code in Filter

Posted on 2006-11-17
4
Medium Priority
?
1,139 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
  • 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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

824 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