JSP problem

H

hristo.ganev

Hi everyone . I have something like the following line in my jsp page.

<c:if test="${object.class.name == 'ObjectClassName'}">

Now i want to change the test so that it verifies that
object.class.name starts with the string 'ObjectClassName'. In other
words, the equivalent of the operator LIKE in SQL, if such a thing may
exist in JSP

Tnx in advance,
icocico
 
S

SMC

Hi everyone . I have something like the following line in my jsp page.

<c:if test="${object.class.name == 'ObjectClassName'}">

Now i want to change the test so that it verifies that object.class.name
starts with the string 'ObjectClassName'. In other words, the equivalent
of the operator LIKE in SQL, if such a thing may exist in JSP

Tnx in advance,
icocico

JSP lets you use any standard Java code. In this case you could simply
use the String method "startsWith()".

object.class.name.startsWith("ObjectClassName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

JSP Methods 16
verbose of jsp, standard tag library 1
JSP EL counterpart for Collection.contains( ) 0
unable to compile login jsp code 1
JSP including 12
jsp and usebeans 1
JSP problem 5
JSTL <c:if .... 3

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top