Is there any way to configure my web aaplication in Java EE so that if JavaScript is not enabled, it always opens a error page.
Thank you
You can use <noscript> tag to show message or link that javascript is not enabled.
However its always a best practice to make functionality with graceful degradation.
Try this
<noscript>
<meta http-equiv="refresh" content="0; url=http://www.example.com/error" />
</noscript>