Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

throw exception from a JSP

Is it possible to throw an exception in a JSP without using scriptlet code?

like image 516
Dónal Avatar asked Jan 25 '23 02:01

Dónal


1 Answers

You really shouldn't be doing anything at the JSP layer that explicitly throws exceptions. The reason you don't want to use scriptlets in JSPs is because that puts application logic in your view. Throwing an exception is inherently application logic, so it doesn't belong in your JSP, scriptlet or not.

like image 120
Heath Borders Avatar answered Jan 26 '23 15:01

Heath Borders