• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AJAX jsp response

 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...)?
 
Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic