Setting the status code on 404

Hi All,
I have my web.xml file pointing 404 errors to /404.jsp on my web server (Apache/Tomcat).
The code for 404.jsp is
<%
// Set the header response to a 404 and no-caching
response.setStatus(response.SC_NOT_FOUND);
response.setHeader("Cache-Control","no-cache");
%>
<jsp:include page="/404message.jsp"/>
404message.jsp contains html and some other jsp scriptlets to display a nicely formatted error page that fits with the look and feel of the web site I am currently working on. I have to set the status like this otherwise the 404 error returns a response of 200 which is no good for the statistics program we run on the site.
It all seems to work wonderfully except that in the localhost log for tomcat I get the following exception even though everything seems to work fine.
2005-04-21 16:11:12 ErrorDispatcherValve[alligator]: Exception Processing ErrorPage[errorCode=404, location=/404.jsp]
java.lang.IllegalStateException: Cannot reset after response has been committed
at org.apache.catalina.connector.ResponseBase.reset(ResponseBase.java:789)
at org.apache.catalina.connector.HttpResponseBase.reset(HttpResponseBase.java:812)
and so on....
Anybody point me in the right direction on this, any help much appreciated??
Cheers,
Beno..

Just wanted to bring this one back to the front as had a zero response.
Anyone shed any light on it for me??
Cheers,
Beno..

Similar Messages

  • AdControl error: HTTP error status code: NotFound (404)

    For over a week now, a Silverlight WP 8 app with an AdControl configured for "test_client" continues to report this error and thus no bing ad visible either while running from an emulator (8.1 512) or from a WP 8 device. If I change the AdUnit
    to use a PubCenter ID it works fine on the device and ads are displayed. The emulator connects to the Internet just fine via IE.
    Could the ad server not be responding to the "test_client"?
    Could someone let me know if it has worked recently for them? I tried contacting MS and no one seems to have an app configured with the test ad... I could give MS so many helpful suggestions. But looking at the hundreds of un-answered posts here - I
    suppose they're busy with Windows 10...and have they asked developers if they're willing to put up everything on the cloud? all the while people still waiting to see the 'start' button on Windows 9?
    here's the trace
    Ad Err: NetworkConnectionFailure,Microsoft.Advertising.Shared.AdException: HTTP error status code: NotFound (404) ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned
    an error: NotFound.
       at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
       at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClasse.<EndGetResponse>b__d(Object sendState)
       at System.Net.Browser.AsyncHelper.<>c__DisplayClass1.<BeginOnUI>b__0(Object sendState)
       --- End of inner exception stack trace ---
       at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
       at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at Microsoft.Advertising.Shared.HttpRequest.EndGetResponse(IAsyncResult asyncResult)
       at Microsoft.Advertising.Shared.WebRequestWrapper.WebRespCallback(IAsyncResult result)
       --- End of inner exception stack trace ---
    I do love Windows - don't get me wrong - I'll check my 2nd dev system soon.

    Hi Ravi,
    Reward points if this helps
    The J2EE server might be overburdened and cannot accept the call. The 'Receive'servlet is not called. You will find further details on the HTTP status code definitions under "http://www.w3.org". Check the accessibility of the server by calling: http://<hostname>:<port>/MessagingSystem/receive/AFW/XI.
    The Listener Beans of the affected connection (AFW, Marketplace, BC,see above) were not registered or the log-specific Event Handler was not found.
    Check out this trouble shooting guide for SAP XI...Section 7.4.4.4 talks about exactly the same problem:-
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd5950ff-0701-0010-a5bc-86d45fd52283
    Reward points if this helps
    Regards
    Pragathi.

  • Setting 2xx Status Code in Message Container

    Hello all,
    is there any possibility to set an HTTP Status code in a message container(/iwbep/if_message_container)? Or to set it in the http response?
    Regards

    Hello,
    Let me correct myself in earlier response. I was saying that it is possible to set messages in response header. As per my understanding, you cannot set http status code such as 2XX etc. it will be setup by GW framework.
    you can pass back messages as discussed in the thread OR can place S, I, W messages in an SAP header SAP-Message.
    Regards,
    Chandra

  • How to set custmer master block for posting & how to set the status .....

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. Use an appropriate subject in your message thread. >
    Hi ...
    How to set custmer master blocked for posting & how to set the status has deleted. please provide the steps for the above two actions.
    thanks

    Hi,
    U can use T-code FD05 for Blocking the customer and
    T-code FD06 in order to set for deletion,
    Assign Points if useful,
    Regards,

  • SSRS Report Manager error "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

    Hi All,
    I am getting error "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"
    in one of my Test Environment when trying to run the SSRS 2012 report from report manager.
    Any clue why it is happening.
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi All,
    Upon investigation found that there was no space (0 Byte is available) in E drive where underlying SQL DB is residing. 
    Once I cleared the space, report started working and above error was not displaying. 
    Thanks Shiven:) If Answer is Helpful, Please Vote

  • An Error Occurred During Report Processing - Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12019

    When I run the report on production I got the following error message:
    Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the
    request on the server. The status code returned from the server was: 12019
    It hasn’t happen on Dev and Test before.                           
    I googled, The error is described as:
    12019 ERROR_INTERNET_INCORRECT_HANDLE_STATE
    The requested operation cannot be carried out because the
    handle supplied is not in the correct state.
    But I cannot find the solution for that. 
    Has it happend to you before? How to solve that?      

    Same behaviour here, Sharepoint 2013 with SSRS in integrated mode
    Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status
    code returned from the server was: 12019

  • ODS Problem - Could not forcefully set the status of the request

    Hello GURUS!
      We encountered an error while activating an ods object:
    <i>"Request REQU_41H61CY8SUS7IX4787ARFXLOM (activation request ODSR_41I8ZUA35YKRALSBFPBB0GWZQ) is marked as incorrect for data package 000000 (DP 0 is the entry for the entire request, which is the only one to remain in the control table after successful activation)."</i>
    We tried to forcefully set the status to <b>green</b> as what we normally do when this happens but it still stays <b>red</b>.
    Need your help on this!
    Thanks,
    Jeffrey

    Hello JeFFreY,
    how r u ?
    You can delete that failed request, then check the PSA for errors, if errors are there delete the PSA data.
    Carry on a new data load with the option in the Scheduling screen -> PROCESSING tab as ONLY PSA. Now check the data for the errors and change it if error exists. Then give context menu on the request and select Start the Update Immediately. Now see in the ODS. what happens ?
    Best Regards....
    Sankar Kumar

  • Sys.webforms.page request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server was:0

    sys.webforms.page request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server was:0 We got this response(In firebug console) when we try to click on link (after leave webpage for 3 minuts ideal) which is AJAX based. Please reply ASAP because its urgent.

    Hi SP,
    Please check if the following web config appSettins value settings from SSRS server could fix the issue (Note, back up your original web config file before any modification).
    http://stackoverflow.com/questions/10911610/ssrs-webpage-error-status-code-500
    http://srinivasbn.blogspot.in/2013/09/syswebformspagerequestmanagerservererro.html
    http://connect.microsoft.com/SQLServer/feedback/details/782155/ssrs-2012-failed-with-win32-error-0x03e3
    If you have more questions about the SSRS error logs related to this issue, you can post in the SSRS forum for a better assistance with more experts.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to capture the Status code in Web application Transcation monitoring if we are using multiple Request

    Hi Team
    We would like to monitor 12 url,s which requires Authentication. Hence i have added the same in one Single Web application transcation template.
    i have added the below info to the get the Stats code displayed in Alert
    Status code is $Data/Context/RequestResults/RequestResult["1"]/BasePageData/StatusCode$
    when i recived a alert it gave the Status code of the 1st Request
    hence i changed the same as
    Status code is $Data/Context/RequestResults/RequestResult["12"]/BasePageData/StatusCode$
    But still i am facing the same issue .
    My first request shows me a status code of 200, and my 12th Request comes with 500 but in the alert i get 200 but it should be 500.
    Kindly help me in how i can get the Status code for the multiple  Request.
    Regards
    Sriram

    Hi Sriram,
    Please run the test of your 12th Request, view full result and check if Status Code is 200.
    Meanwhile, you can run the URL manually to check the result.
    Niki Han
    TechNet Community Support

  • How to set the status for a customer plan to RELEASED.

    Hello all,
    I created a program for mass creation of customer plans. But after the creation of a plan, the status should be set to released, so that the user can go about creating the trade promotions for the customer plan. Can anybody tell me how to set the status of a customer plan to RELEASED.
    Thanks,
    Disha.

    Hi Clemens,
    I am not talking about doing it in the CRM_UI transaction..I created a program..which would create the customer plans based on the planning account data provided. I was succesfull in creating the plans, but I am not knowing how to release it, if only anybody can tell me about a Function module or method, which can help me do this, that would be great
    Thanks,
    Disha.

  • DVD Player Hasn't set the REGION code

    I just got a new MacBookPro (a replacement for one that had failed). Well, I restored all my data and am working fine... BUT...
    I think all my settings think that I've already set the Region Code of the DVD drive. But, using a tool, I was able to verify that the region code has NOT been set.
    How can I force DVD Player to set the region code of the DVD Drive? Right now, I can't play anything.
    Thanks!

    Hi Jack and welcome!
    Until I read the last sentence my answer would have been: insert a commercial DVD intended for your region code (unhelpfully you don't say where you are!), i.e. NTSC for the US or PAL for Europe, and it will ask you set the region code for that DVD.
    Remember: you can only ever do this five times, so best not to play DVDs from other regions.
    But then you spoilt it all by saying "Right now, I can't play anything"!
    What did you try to play?
    Did you repair permissions?

  • Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occured while processing the request on the server.The status code returned from server is 12019 in report viewer

    I am not able to run Report in Report viewer due to the below error:
    Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occured while processing the request on the server.The status code returned from server is 12019 in report viewer
    This report works fine in SSRS tool. but after i deployed into sharepoint 2013 site, it throws error.
    Please advise what needs to be done
    Any help is really appreciated.
    Thanks,
    SP

    Hi SP,
    Please check if the following web config appSettins value settings from SSRS server could fix the issue (Note, back up your original web config file before any modification).
    http://stackoverflow.com/questions/10911610/ssrs-webpage-error-status-code-500
    http://srinivasbn.blogspot.in/2013/09/syswebformspagerequestmanagerservererro.html
    http://connect.microsoft.com/SQLServer/feedback/details/782155/ssrs-2012-failed-with-win32-error-0x03e3
    If you have more questions about the SSRS error logs related to this issue, you can post in the SSRS forum for a better assistance with more experts.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
    Thanks
    We are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to set the status when Idoc fails

    Hai ,
    I created Idoc extension & created a segment under that(Delivery related).
    My requirement is,
    if certain data not found,
    Idoc should fail with text"Shipemnt for delivery <del. No> not found.
    Could you please help me how to do this?
    I checked the table EDIDC table but the above mentioned status is  not there.
    Thanks & Best Regards,
    Bhaskar.

    you need to set the status using IDOC_STATUS
    where ever error occurs populate the status table.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
       IDOC_STATUS-STATUS = '51' ." if it is inbound
       IDOC_STATUS-MSGTY  = Message-type.
       IDOC_STATUS-MSGID  = message-id.
       IDOC_STATUS-MSGNO  = message-MSGNR.
       IDOC_STATUS-MSGV1  = message-MSGV1.
       IDOC_STATUS-MSGV2  = message-MSGV2.
       IDOC_STATUS-MSGV3  = message-MSGV3.
       IDOC_STATUS-MSGV4  = message-MSGV4.
    *  IDOC_STATUS-SEGNUM = ?????????????????
    *  IDOC_STATUS-SEGFLD = ?????????????????
    *  IDOC_STATUS-UNAME  = ?????????????????
       IDOC_STATUS-REPID  = SY-REPID
    *  IDOC_STATUS-ROUTID = ?????????????????
       APPEND IDOC_STATUS.

  • To know the Status code of a HTML page using Javascript

    To know the Status code of a HTML page using Javascript

    Hello,
    I am not sure to understand, which status are you talking about? The HTTP Status?
    If your javscript is executed it is more or less sure that the HTTP Status is 200 since the request is back to the browser.
    or are you talking about this is in the context of a XMLHTTPRequest call ?
    Regards
    Tugdual Grall

  • Error: Request failed. unexpected response from server. the status code of response is '0' in safari browser

    Hi,
    I am using Javascript serializer to send server side code to javascript.
    This works in IE 9, Mozilla, chrome. But fails with error in Safari as "request failed. unexpected response from server. the status code of response is '0' . status text of the response is ". null
    My code is as below:
    <asp:UpdatePanel ID="panLayout" runat="server">
    <ContentTemplate>
    <div id="divloadingImage" >
    <br />
    <asp:Image ID="imgLoading" runat="server" ImageUrl="/images/rotate.gif" ImageAlign="Middle" />
    <br />
    </div>
    <div id="banner-fade" >
    <ul id="carousel" class="bjqs">
    </ul>
    </div>
    <asp:Timer ID="timerRSS" Interval="1" runat="server" ontick="timerRSS_Tick"></asp:Timer>
    </ContentTemplate>
    </asp:UpdatePanel>
    In CS:
    protected void timerRSS_Tick(object sender, EventArgs e)
    DisplayImages();
    divloadingImage.Visible = false;
    bannerfade.Visible = true;
    timerRSS.Enabled = false;
    private void DisplayImages()
    List<SharePointListItem> allImages = GetallImages();
    JavaScriptSerializer serializer = new JavaScriptSerializer();
    string json = serializer.Serialize(allImages);
    string script = string.Format("<script type=\"text/javascript\">var allSliderImages={0}</script>", json);
    if (!this.Page.ClientScript.IsClientScriptBlockRegistered("clientScripts"))
    ScriptManager.RegisterClientScriptBlock(panLayout, panLayout.GetType(), "clientScripts", script, false);
    string scriptRegister = string.Format("<script type=\"text/javascript\">FetchData();</script>");
    ScriptManager.RegisterClientScriptBlock(panLayout, panLayout.GetType(), "clientScriptData", scriptRegister, false);
    In Javascript:
    function FetchData() {
    if (typeof allSliderImages !== "undefined") {
    for (var i = 0; i < allSliderImages.length; i++) {
    Imagesuccess(allSliderImages[i].fileleafref, allSliderImages[i].filedirref, allSliderImages[i].caption1);
    var rota = $("#bannerfade");
    rota.css("display", "block");
    function Imagesuccess(fileLeaf, fileDir, UserCaption1) {
    var ul = $('#bannerfade > ul');
    var li;
    var filename = fileLeaf;
    var dir = fileDir;
    var caption1 = UserCaption1;
    var sfils = filename;
    filename = dir + '/' + filename;
    var imageCaptionData;
    if (caption1 != null && caption1 != "") {
    imageCaptionData = '<div class="HeadlineDiv">' + caption1 + '</div>';
    li = $('<li>' + imageCaptionData + '<div class="SubHeadline" style="color:white;">' + '<br/></div>' + '<img src="' + filename + '"/>' + '</li>');
    ul.append(li);
    $('#bannerfade').bjqs({
    height: 354,
    width: 970,
    responsive: true
    Below is the data I get:
    <script type="text/javascript">
    var allSliderImages=[{"id":"1","Title":"Scenic","caption1":"scenic","fileleafref":"02.jpg","filedirref":"/s/Test/Library"},
    {"id":"2","Title":"nature","caption1":"scenic2","fileleafref":"C034.jpg","filedirref":"/s/Test/Library"},
    {"id":"3","Title":"Tiff","caption1":"Tiff","fileleafref":"test_tiff.tif","filedirref":"/s/Test/Library"}]</script>
    The data is shown in all browsers except Safari. How to fix this?
    Update: I have checked this link: http://sharepoint.sureshc.com/2013/07/unexpected-response-data-from-server-in.html
    but that did not help.
    Thanks

    Hi,
    From
    this documentation, though SharePoint 2013 supports several commonly used web browsers including Apple Safari (latest released version), it is not guarantee
    that SharePoint 2013 can run perfectly on all these browsers, “certain web browsers could cause some SharePoint 2013 functionality to be downgraded, limited, or available only through alternative steps”.
    According to the code provided, it seems more relate to ASP.NET, therefore, a suggestion is that you can open a thread in ASP.NET forum, communities there will be more familiar
    with this issue:
    http://forums.asp.net/
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

Maybe you are looking for