Is there a way I can get a attribute set in ServletContext
in EL so that it ends up as a JavaScript variable?
I am setting it as
context.setAttribute("testing.port", "9000");
I tried retrieving it like
alert("port" +'${testing.port}');
I am just getting a blank.
${servletContext}
doesn't exist. There's${pageContext.servletContext}
, but that isn't what you want. See also stackoverflow.com/tags/el/info and docs.oracle.com/javaee/5/tutorial/doc/bnahq.html#bnaij – Fencesitter