• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AJAX jsp response

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic