| Author |
AJAX jsp response
|
Ashimashi Kabashi
Ranch Hand
Joined: Sep 11, 2006
Posts: 84
|
|
following is a JSP code responds to an AJAX script everything seems to be ok, except for the output expected on the html page is supposed to be "Hello" but the following code: gives the response: "<% response.expires=-1; response.write("Hello"); %>" [ January 20, 2008: Message edited by: Ashimashi Kabashi ]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Is this a JSP page or an ASP page? It looks like ASP to me. Whatever it is, your server is treating it like plain text. Can you tell us a little about how you're deploying it (what container, what file name, the location on your server, etc...)?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ashimashi Kabashi
Ranch Hand
Joined: Sep 11, 2006
Posts: 84
|
|
two files in CATALINA_HOME/webapps/abc/tmieAjax.html and CATALINA_HOME/webapps/abc/tmie.jsp code for timeAjax.html is
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
First thing you should do is open up the page in the browser directly. If it does not run in the browser, than you know the issue is with your serverside code. Eric
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
OK, this code: is not valid JSP code. Again, the syntax looks like Microsoft ASP to me. If this is in a file with a ".jsp" extension and in a valid Tocmat application, then there is something else wrong on your server as well. It should be throwing exceptions when you try to run it with that code inside the scriptlet tags. It looks like your problem in on the server side.
|
 |
 |
|
|
subject: AJAX jsp response
|
|
|