| Author |
catching invalid variable references (jsp + struts)
|
Csaba Szegedi
Ranch Hand
Joined: Mar 27, 2010
Posts: 36
|
|
Hello,
We are using JSP with Struts 1.2 and we had an invalid variable reference in the jsp page.
My question is: is there any chance to catch it later in the log or in any other else way ?
Thanks in advance.
Cs
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
you cant access static variable using class name in EL. EL only evaluate methods of a bean via setters/getters .
So, work around would be create a setter/getter instance method for the static variable then create a instance for that class and put it request/session scope and access that as in,
For clean approach:
Please go through this (<= click) article
|
 |
Csaba Szegedi
Ranch Hand
Joined: Mar 27, 2010
Posts: 36
|
|
|
My question was about catching this kind error.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Csaba Szegedi wrote:My question was about catching this kind error.
Oh, sorry . EL will not report error if the *Utils* property not found in any one of the scope.
So, I think you cant deal with such idiom .
|
 |
Csaba Szegedi
Ranch Hand
Joined: Mar 27, 2010
Posts: 36
|
|
Seetharaman Venkatasamy wrote:
Csaba Szegedi wrote:My question was about catching this kind error.
Oh, sorry . EL will not report error if the *Utils* property not found in any one of the scope.
So, I think you cant deal with such idiom .
No problem, thanks for your reply.
|
 |
Seetharaman Venkatasamy
Ranch Hand
Joined: Jan 28, 2008
Posts: 5575
|
|
Csaba Szegedi wrote:thanks for your reply.
You are welcome
|
 |
 |
|
|
subject: catching invalid variable references (jsp + struts)
|
|
|