search

Home  >  Q&A  >  body text

jsp里面放的java代码,总是出错,给看看

PHP中文网PHP中文网2810 days ago403

reply all(5)I'll reply

  • 巴扎黑

    巴扎黑2017-04-18 10:00:28

    <% if(${porfiles.bdb}.equals("0")){
    }

    Syntax error. Looking at the error message, it is obviously a jsp compilation error.
    There is a problem with the syntax in this place.
    In jsp, <% //There is normal java syntax here. It will not recognize your way of writing el expressions and the like. %>
    If you want to use el expression, don’t use it inside <%%>
    Just use it outside

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:00:28

    <%}else if(){
        %>

    Here, what’s the condition of if?

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:00:28

    In addition to what is mentioned above, it is more reliable to put the string 0 in the front, otherwise it will be empty in the front

    reply
    0
  • PHPz

    PHPz2017-04-18 10:00:28

    Never write this kind of code, readability and maintainability are zero. !

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:00:28

    Replace it with a C mark, it’s so messy and hard to find

    reply
    0
  • Cancelreply