Previous Next vertical dots separating previous/next from contents/index/pdf

Handling unresolved external variables

The BEA Workshop Studio group of products automatically detect the variables available to be used in a JSP page. These variables could be declared in the JSP page itself, for example by using a jsp:useBean tag, or declared externally, for example by setting a request scope attribute in a Struts action java class that is executed before the page is displayed.

In some situations, the IDE cannot detect some of the external variables, and it reports warnings when they are used in the JSP pages. An example of this is when a variable is set in a Struts plug-in.

For example, if a lastLoginDate session variable is known to be accessible at runtime from a JSP page but is not detected, the IDE can suppress this error message by adding a JSP comment before the first usage of the external variable in the page:
<%-- <nitrox:var name="lastLoginDate" type="java.util.Date"/> --%>
This comment declaration will suppress the warnings related to the external variable usage and adds the variable to the Variables view.
Note that the type attribute in this JSP comment is optional.

To automatically suppress external variables through use of a suppression in the JSP page, go to the Variables view and click the pull down menu. Select New External Variable and add the appropriate information to the New External Variable dialog. The IDE will then add the variable to the Variables view and automatically add the suppression comment to the JSP source.

 

Skip navigation bar   Back to Top