JSP Data Validation

Associate
Joined
18 Mar 2007
Posts
291
Hi,

Is it possible to stop data being passed to a JSP function from a URL?

Let me try explaining what is happening:

I have a little chatbox on the side of my site, which allows the user to enter a name and message. When they click the submit button, it goes off to a page: db-action.jsp, which writes the data to a database and then retrieves it to display it on the page. The URL is something like http://localhost:8080/db-action.jsp?name=Rob&message=Test .

If I then click refresh on that page, the data gets sent off to the database again as I would expect and therefore enters the same result into the database and writes it's value to the page again.

Are there any good ways to stop this?

I'm not sure if my explanation is particularly clear!

Cheers
 
Back
Top Bottom