I need to display a message like "Data has been already inserted " in a jsp
If inserting data has already exits in a database table

you could use a stored procedure that checks if the data entered already exists or not and outputs a value for u to ckeck (say...1 if the data exists and 0 otherwise).
then u will show an alert if the value was 1.

or u could do the validation by ur self, when u click on the submit button.
anyway give us more details on ur case so we can help u.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.