using jstl you can directly get the application object in jsp
${applicationScope['attributeNames']}
using this expression, you can get your application level object directly in jsp
OR
using scriptlet can also get the application object in jsp and if you are running web_app version 3.0 and have the Servlet 3.0 API, you can directly get the ServletContext HttpServletRequest object object, as shown below:
<% ServletContext sc = request.getServletContext(); sc.getAttribute("attributeName"); %>
but you should use the application object when using a scriptlet to get the JSTL application object it is much better to use the script code
More details:
source share