PDA

View Full Version : AJAX in JSP.. I Need Help



pj1479
12-19-2005, 09:50 AM
Hi All,
I am new to AJAX and JSP. I want to use ajax in my jsp page. can someone guide me.

Thanks in advance.

Twey
12-19-2005, 11:44 AM
You don't use AJAX on your JSP page, unless you're having it generate it or something equally odd. What one would generally do is have the AJAX page connect to the JSP page to retrieve dynamic content. There's an AJAX tutorial here (http://developer.mozilla.org/en/docs/AJAX:Getting_Started).

pj1479
12-20-2005, 06:23 AM
Hi Twey,
thanks a lot for ur help. I will try it now.
Paresh

smrithi
01-10-2008, 06:31 AM
find an example on using ajax with jsp at my blog http://newtechies.blogspot.com

Twey
01-10-2008, 09:40 AM
Not a very good example, I must say.

smrithi
01-22-2008, 10:13 AM
I must say that the site you redirected the newbie is not at all appropriate to the question he posed. The example I have given in the blog is actually doing the ajax thing with jsp. I have seen the tutorial of the link you have given. Its just the theory of what is ajax but a well-versed example is not there.

Twey
01-22-2008, 11:01 AM
You evidently didn't look very hard, then. It doesn't cover JSP, but I'm assuming that the poster is already aware of how to use JSP. It does, however, provide thorough coverage of the XMLHttpRequest object, walking the reader through the different steps required to get data and then bringing it all together with an example, as well as showing how to handle the data once retrieved.

Yours, on the other hand, capitalises "AJAX" erratically ("Ajax" tends to be used as a "look at me" buzzword to describe sites that use fading effects and have "BETA" stamped across them as if it were something to be proud of), and demonstrates a wide range of bad practices, from invalid HTML (which actually resembles XHTML for some [but not all] tags, an even worse preconception to force upon the newbie reader, especially since, rendered as XHTML, your examples break horribly), to non-standard Javascript such as innerHTML. The poor English is probably less important, but bears mentioning anyway, as it ties in with everything else to make sure that even if it's a rather rubbish AJAX tutorial, your page at least serves use as a cautionary example of how not to write an AJAX tutorial.

smrithi
01-22-2008, 11:20 AM
So you dont even bother to read what the poster wrote. He wrote clearly "I am new to Ajax and Jsp" and ur assumption is that he knows JSP. Great! Anyways, I never asked you how my blog looks and what are the faults in it for you to mention so rudely......
Keep your opinioins to urself until and unless someone asks you.
Well, AJAX as in was a purposeful effort to emphasize on the technique and otherwise everyone knows it isnt spelled that way.
If the poster really wanted to know about Ajax, he could have followed the posts in my blog...
I guess this is a forum where everyone is there to help the needy. Neither like you who feel as if you are the only person who is there to judge people. Mind your business and try helping people. Dont do this stuff next time

Twey
01-22-2008, 12:28 PM
So you dont even bother to read what the poster wrote. He wrote clearly "I am new to Ajax and Jsp" and ur assumption is that he knows JSP."And" can and often is used in a context like this to mean "with:" that is to say, the poster was unfamiliar with using AJAX and JSP together. You're right, however, in that it was an ambiguous statement, and I should have directed him/her to a JSP tutorial as well in order to be sure.
I never asked you how my blog looks and what are the faults in it for you to mention so rudely......Nevertheless, they bear pointing out for the benefit of the unsuspecting reader. Perhaps my tone could have been more contained, but when writing for a technical audience I tend to focus more on content.
Keep your opinioins to urself until and unless someone asks you.Of the above post, this part:
it's a rather rubbish AJAX tutorialwas opinion. The rest was technical fact (which justified that opinion).
Well, AJAX as in was a purposeful effort to emphasize on the technique and otherwise everyone knows it isnt spelled that way.I don't understand your English here. Can you rephrase/clarify?
If the poster really wanted to know about Ajax, he could have followed the posts in my blog...And ended up using poor practices and thinking they're correct, yes. To this end he/she (I'm not quite sure why you think the poster is male) could have chosen another error- and omission-filled tutorial site, such as W3Schools.
I guess this is a forum where everyone is there to help the needy. Neither like you who feel as if you are the only person who is there to judge people.I judged your articles (and I reiterate, based largely on technical fact, although I suppose I may have been somewhat biased by the poor presentation of the information), not yourself. Taking this as an ad hominem insult would be an error on your part. Since you reiterate the point, I must reiterate my response: by pointing out the shortcomings of your post(s), I helped the unsuspecting readers, both intended and unknown, to avoid falling into the trap of believing and following your advice and examples line for line. Should you create a more accurate introduction to the topic (and I, and I am sure other members of the forum, would be happy to assist you in doing so should you have any questions), I would have no problem with you posting it in response to questions (although I must say that your posting a link to your own blog in a two-year-dead thread rather smacks of someone posting links to a popular site in order to up their Google PageRank: I initially thought you were a spambot, it's quite lucky I decided to leave the post anyway instead of deleting it outright).
Mind your business and try helping people.I repeated it once, but I can't be bothered typing it out a third time. Please, you need only make a point once in your posts. Repeating yourself only wastes your time, your readers' time, and the time of anybody attempting to comprehensively reply to your post.
Dont do this stuff next time"This stuff?"