JSP problem

Discussion in 'Java' started by hristo.ganev@gmail.com, Feb 28, 2006.

  1. Guest

    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
     
    , Feb 28, 2006
    #1
    1. Advertising

  2. SMC Guest

    On Tue, 28 Feb 2006 20:45:03 +1100, hristo.ganev wrote:

    > 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")

    --
    Sean

    If you want it real bad, you can get it *real bad*.
     
    SMC, Mar 1, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthias Nietz
    Replies:
    1
    Views:
    3,456
    VisionSet
    Nov 12, 2003
  2. Raymond DeCampo

    Custom tags and <jsp:plugin> / <jsp:param>

    Raymond DeCampo, Feb 18, 2004, in forum: Java
    Replies:
    0
    Views:
    635
    Raymond DeCampo
    Feb 18, 2004
  3. Timo Nentwig

    JSP 2.0: <jsp:attribute> in <c:if>

    Timo Nentwig, May 10, 2004, in forum: Java
    Replies:
    0
    Views:
    630
    Timo Nentwig
    May 10, 2004
  4. Replies:
    0
    Views:
    4,396
  5. Replies:
    5
    Views:
    480
Loading...

Share This Page