mardi 9 janvier 2018

Reading Scriptlet element inside if condition

I have the following piece of code

 <%@ page language="java" import="java.util.*" %> 
 <%@ page import = "java.util.ResourceBundle" %>
 <%
   ResourceBundle resource = ResourceBundle.getBundle("abc.properties");
   String myval = resource.getString("my.val");
 %>

I want to read the value of myval inside a if condition based on which i want to display an option.

 c:if test="${fn:containsIgnoreCase(myval,'Y')}">
 <option value="option 1" id="myvaloption1">option 1</option></c:if>

This code is not working. Please help

Aucun commentaire:

Enregistrer un commentaire