• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling servlet through Ajax  RSS feed

 
naga eswar
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

We are working on a requirement and we need to call servlet through Ajax. At local system, working on windows operating system its working fine.
But after deplying in production which is unix OS (AIX), we are getting xmlHttp.status as 404. can any body help me please.

Below is the code.


 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66154
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggestion #1: use jQuery for your Ajax. It vastly diminishes the failure points.

Suggestion #2: use the browser developer tools to watch the network activity.

The most likely point of failure is the URL. Make sure that it is correct and using the context path properly.
 
naga eswar
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear.

Yes we can use JQuery. But it will take time for me as i didnot work with it.
As it is production issue we need to resolve as early as possible.

What is said is right the problem is at URL.
The same URL is working fine at UAT. Once we deploying production the we are facing this issue.
Please help me out if any other options for URL
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is said is right the problem is at URL.
The same URL is working fine at UAT. Once we deploying production the we are facing this issue.

That being the case, should you not examine what the URL is, and at which point the construction of the URL goes wrong, so that you can take corrective action?
 
naga eswar
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf.

yes what I have done. I have gave full URL as below

Http://IPAddress:portno/travel/TravelUpdateConfirm?ECODE="+ecode.

IPAddress: production ip address
portno: producton port no.

But same runningin UAT and not in production. Its not going into servlet at all.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!