Solved

Get HTTP status code in Filter

Posted on 2006-11-17
4
1,113 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 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Protect jar file - windows app 2 53
java.io.BufferedReader   readLine()  //returns the entire file ? 4 73
egit plugin on eclipse 8 64
mysql jsp example issue 32 38
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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:

803 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