This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Sending HTTP status code to browser through servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sending HTTP status code to browser through servlet" Watch "Sending HTTP status code to browser through servlet" New topic
Author

Sending HTTP status code to browser through servlet

Pranav Pal
Ranch Hand

Joined: Nov 04, 2007
Posts: 74
How HTTP status code can be sent to browser through servlet?
Thanks in advance


Hakuna Matata!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
All the relevant methods are part of javax.servlet.http.HttpServletResponse.


Ping & DNS - updated with new look and Ping home screen widget
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ulf Dittmer:
All the relevant methods are part of javax.servlet.http.HttpServletResponse.


http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletResponse.html#setStatus(int)
Also notice that, at the top of the API page, there is a list of constants defined representing each of the status codes.
[ December 07, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending HTTP status code to browser through servlet
 
Similar Threads
store browser status code in Servlets
Servlet Problem
Servlets
HTTP status 404
What is difference between RequestDispatcher() and sendRedirect()?