aspose file tools*
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
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: 41879
    
  63
All the relevant methods are part of javax.servlet.http.HttpServletResponse.


Ping & DNS - my free Android networking tools app
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