A recent project of mine needs to use ASP defined variables inside of Java. How would I go about doing that?

Here's the code. I would need to replace "this page" with two variables.

Code:
function confirm_delete()
{ return confirm("Are you sure you want to delete this page?")}