Thread: JSP Sucks

  1. #1
    The Dragon Reborn
    Join Date
    Nov 2009
    Location
    Dublin, Ireland
    Posts
    629

    JSP Sucks

    honestly, I think so..i was able to learn PHP last summer because it was so beginner friendly..but now I have a true Enemy of Mine..J bloody SP
    if you're a jsp programmer..do you know why
    <c:when> or <c:if>
    always seem evaluates to true? to solve the issue i had to use an otherwise tag..which forced me to have multiple choose tags because i can't have if else if and else..

    To elaborate I was trying to do some simple validation
    if a parameter is empty set this variable to this.so

    Code:
    <c:if test="${empty param.fname}">
         <c:set var="error" value="Please enter first name"/>
    </c:if>
    Except even though fname is not empty..it will set error variable to "Please enter first name"..Why on earth is that happening? :S

    If you can clear this dark cloud up, I will appreciate it..Thanks.
    You ended that sentence with a preposition...Bastard!

  2. #2
    and the hat of copycat stevesmithx's Avatar
    Join Date
    Sep 2007
    Posts
    587
    Funny, that should work. Did you try tracing out the value of param.fname before it enters the if block?
    Not everything that can be counted counts, and not everything that counts can be counted
    - Albert Einstein.


    No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
    - Herbert Mayer

  3. #3
    The Dragon Reborn
    Join Date
    Nov 2009
    Location
    Dublin, Ireland
    Posts
    629
    unfortunately...i am not sure how to debug jsp
    You ended that sentence with a preposition...Bastard!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. this REALLY sucks
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-31-2004, 12:46 AM
  2. How Cool is Java
    By dukemarlon in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 11-28-2002, 05:24 PM
  3. Why europe sucks
    By compjinx in forum A Brief History of Cprogramming.com
    Replies: 37
    Last Post: 04-08-2002, 07:02 PM
  4. Why the DX8.1 SDK sucks....
    By jdinger in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 04-06-2002, 12:07 AM
  5. Microsoft Sucks
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 110
    Last Post: 11-08-2001, 04:30 PM