There are several problems in doing so.
First, we need to build up our own taglib, which cannot make good use of existing JSTL and EL functions.
Also, as JSP is already in the presentation, should we make a DB connection at the presentation, instead of getting the value from Controller and pass to the view?
Third, I guess he just wanna replace the value "7" by a
Java Constant, and that value, I suppose, is coded in a Java class. I am not sure whether EL can accept scriptlet, have you tried to use <%=xxx.seven%> to replace it? where xxx is the Java class that contain the constant. Otherwise, you might consider to put the constant into request scope, so that EL can access it by ${test_value == seven}.
Nick
SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)