aspose file tools*
The moose likes JSP and the fly likes Help to get the textbox value and display it in the same page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Help to get the textbox value and display it in the same page" Watch "Help to get the textbox value and display it in the same page" New topic
Author

Help to get the textbox value and display it in the same page

Santhana Lakshmi.S
Ranch Hand

Joined: Aug 16, 2005
Posts: 82
hi,
In my project, i have given a option to user to enter their comments.

In one page i gave one text box and submit button(say usercomment page).After clicking the submit button the user commment gets added in the database.After adding the usercomment in the database i redirect the page to usercommnetPage (contains the textbox and submit button).
In the usercomment page itself i want to display the user's comment.
I tried by taking the comment stored in the database,it is getting displayed but the recently added comment gets displayed after refreshing the page.

I tried to refresh the page by adding meta tag the disadvantage is every n number of seconds the page is getting refreshed.

Is there any other way to display the recently added comment without refreshing the page manually?can anyone help me in this?

Thanks a lot
aslam parveez
Ranch Hand

Joined: Apr 25, 2006
Posts: 47
Instead of taking the comment from database what probably you can do is setting the comment into the session. Once you are done with the databse insertion successfully and redirected back to the usercomments page then you can retrive the latest comment from session and display it.
Santhana Lakshmi.S
Ranch Hand

Joined: Aug 16, 2005
Posts: 82
hi
thanks for your reply.
Sorry,i forget to mention this in my question.
I want to display all the comments entered by that user and also the recent comment.
By using session object i am able to retreive the recent and the last comment only.but i want to display all the comments entered by the particular user.

Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help to get the textbox value and display it in the same page
 
Similar Threads
navigation problem
Dynamically adding rows to JSP
Enable/disable buttons - File download(CSV)
FacesMessage being displayed when the page is opened
creating textbox