In Java this piece of code, request.getSession().getAttribute(“my_var”) can be accessed using JSTL with the sessionScope keyword. To access my_var, call sessionScope.myvar.

Remember to use sessionScope because if your Java code looks like this: request.getAttribute(“my_var”) will not work. See sample JSTL code below.

tomcatWhen using Apache Tomcat as the Servlet container server for your Servlet needs, sooner or later you will come across a situation where you need to do something before and after you login using j_security_check. The solution is to use Servlet filters so that every request will pass through these filters. But using it for j_security_check? The answer is? NO. You cannot do this in Tomcat. While I did read in some articles that IBM Websphere will let you do this, in Apache Tomcat there is just no way. You can try some other workaround that uses the Servlet Filter class to do what you want it to do.

Related Posts Plugin for WordPress, Blogger...