943,643 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 2408
  • JSP RSS
Dec 2nd, 2008
0

jsp with ajax

Expand Post »
hai to all..
help me to solve my problem...
im dng one project..in my project i do have one database.. it wil be updated for every 30seconds.. so i have to display the data from database with thier updates.i mean i would like to display data's in the client browser..whenever there is an update in data base the browser should display the recent datas from database..
here i m using ajax with 30 seconds interval to refresh broswer and making cal to jsp page after 30seconds. so after every 30 seconds ajax wil cal my jsp.. jsp wil retrieve datas from databse..

its running fine and getting refresh for every 30seconds..
bt display's the same data wat displayed in first time..
bec here jsp is compiled servlet(it means jsp with retrieved data wen it is compiled).. so my ajax caling compiled jsp and gives the output from compiled jsp..so its giving same result.. its not giving recent datas..

i explained my problem as much wat i can..

i wil try explain if any one cant get..

help me....
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ucan_aps is offline Offline
2 posts
since Nov 2008
Dec 2nd, 2008
0

Re: jsp with ajax

First thing you could do to help us is get rid of that SMS or Instant Messaging language to let us understand your problem better and get rid of the ".."s we are not playing fill in the blanks here, and finally use a spell check.

Next do not do database connectivity directly inside a JSP. And also paste the code of the JSP you are talking about, cause honestly what you are saying defies logic to me.

Also note when JSP is converted to a servlet, it is not executed. So no data will be fetched at the this time, Its just like when you write a normal Java application, during compile time the code is converted into a class file (it is not executed) and only when you specify "java <main-class-name>" it is executed and thats when the data fetching happens.

Please a sincere suggestion to you is first concentrate on the basics of the language before jumping in to advanced topics. What I have mentioned here would have been covered in any book on JSPs in the first or second chapter itself. The greatest towers in the world stand because they have a strong foundation underneath. Similarly you should never leave out the basics and just jump to advanced topics just to save time, in fact you will end up spending more coming back to the basics each and every time you run into any sort of trouble.
Last edited by stephen84s; Dec 2nd, 2008 at 2:53 am.
Featured Poster
Reputation Points: 653
Solved Threads: 151
Nearly a Posting Virtuoso
stephen84s is offline Offline
1,316 posts
since Jul 2007
Dec 2nd, 2008
0

Re: jsp with ajax

thanks..
i will do study the basic's..
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ucan_aps is offline Offline
2 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: How to use a Hyperlink to send info to a servlet
Next Thread in JSP Forum Timeline: [ask]validation for user name registration





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC