Hello All,
I wrote a taglib for replacing certain part of strings based on some business rules and it is used as below in my
jsp
Before the jsp is called, we set the attribute "username" into session which is verified. So, attribute not available in session is out of scope.
But in tag code, we observed that username is null (taken from sessionScope.username).
So I replaced EL with scriptlet using the implicit object session like
which threw me a compilation exception upon accessing the page, saying that "session" could not be resolved.
But then I replaced with
and this time it worked.
Ideally I want to use sessionScope and avoid scriptlets all together. But for some reasons, I could not get this work. Am I doing any mistake here ?
If I could get EL work for me, I would also like to use EL to form a
string like
.
Could some one help me understand why this is failing ?