This is more of a theoretical question about eclipse internal browser behavior. I am working on a web application in eclipse, in which I send an AJAX request from JSP to a servlet. There are few standard output expressions in servlet that show up on console and then servlet send the response back in AJAX success function. I just alert success message in success function. Now when I run this application on Firefox.
The execution happens this way as I expect.
Data is sent from jsp to servlet.
Servlet prints the standard output on console.
Response is sent back to the AJAX call.
Browser shows the success alert.
while in Eclipse internal browser:
Data is sent from jsp to servlet.
(Nothing happens in the console.)
Response is sent back to ajax success function.
An alert box shows up.
I click the alert to go away...
Then it prints the standard outputs in the Eclipse console which I was expecting in the 2nd step.
Why does Eclipse browser stop the console from printing until the AJAX request is complete while other browsers don't? Is this the expected behavior of Eclipse browser or not?
Related
In my MVC application, I have used Ajax's Response.StatusText to display custom error messages to user whenever there is some error.It works fine but when I deploy my application on AWS, the StatusText gets removed and only the code is displayed. Got to know that because of using HTTP/2, the statusText gets removed.
Is there a way to show custom error message in Ajax error over HTTP/2 ?
Thanks in advance.
I don't think the HTTP Status is the best place to put these. You should either put this status in the body, or possibly in a custom HTTP header.
I am sending ajax request to spring controller from dialog box. The request is processed correctly, but after that dialog box is get closed and page is redirected to the url send in request.
I tried #RequestStatus(HttpStatus.OK) to not send any view name. Still page gets refreshed.
What I want is to remain dialog box open which sends request and page should not get refreshed.
I have an ASP.NET MVC application that works fine most of the time. Occasionally, users complain that they submit an action request and the application appears to hang (i.e. no response is received by the browser even after several minutes and eventually the browser times out.) I can see from HttpWatch that the request is being submitted, IIS logs show the server receiving the request and the application logs show the request action being invoked and completing normally. HttpWatch gives an error which is usually 'ERROR_INTERNET_CONNECTION_RESET' or 'NS_ERROR_NET_RESET'.
The application also does a number of Ajax requests to the same server which all appear to function normally - the 'hang' situation only occurs on full HTTP page loads (i.e. not Ajax requests.)
At first I thought this was browser related, but it happens both with IE8 and IE9 and with FireFox 17, which may be the reason for the two different error messages posted above.c
Does anyone have any idea what the problem is?
Is it possible to write and create a JavaScript Ajax request witch cannot be catched by the Firebug plugin in Firefox?
I'm asking this because I can see on Facebook that there are no Ajax request going on, but still when I sent a message from another Account, the message box on the top will add the "1 unread message" indicator... How's even this possible to achive?
Thanks.
Firebug logs "standard" AJAX requests to the Console panel; these are requests initiated using ActiveX/XHR.
Other types of requests are happening, though - CSS loading, images, javascript, etc. These requests are logged in Firebug's Net panel. Note also that requests logged in Console also appear in Net.
JSONP is a cross-domain method of AJAX in which a <script> tag is added to the page. When the request completes, the loaded contents of the script tag are parsed as JSON. The reason this works is that you are "tricking" your browser into treating the request as a request for a javascript resource rather than an AJAX request, thus skirting cross-browser security restrictions.
Putting this all together, JSONP requests (as well as all other types of requests, listed here as well as all <iframe> requests) are logged on the Net panel rather than in the Console panel. This isn't a bug or a problem; understanding the way JSONP works it is logical that the request would only appear in Net.
When using jsonp as your data type your calls do not show up in Firebug.
Please can some one explain me how to use Fire-bug add-on to check about whether Ajax request successfully send from our application ???
When you turn on Firebug, there's tab called 'Network' - there are shown all requests, especially ajax. The network tab allows you to filter requests and check request/response headers, status code, and message.
So, if you turn on Firebug and open Network tab (it's possible you'll have to enable tracking first, in that case it will show appropriate message), you will see if there was a request, where you expected it should be.
To see only ajax requests, check XHR on top bar, just under general tabs.
It will display in 'console' tab in firebug. i show you ajax call and request. it show ajax request like if ajax is successful then is gives 200 request and display the data or if the ajax request if fails is gives you a 301 request or some other request.