Checking attribute exists in JSP

后端 未结 5 1413
别那么骄傲
别那么骄傲 2021-02-01 13:15

I have some classes which extends a superclass, and in the JSP I want to show some attributes of these classes. I only want to make one JSP, but I don\'t know in advance if the

5条回答
  •  故里飘歌
    2021-02-01 13:49

    The accepted answer may have some side effects when I just want to test if the object has a field, but do not want to output the value of the field. In the mentioned case, I use the snippet below:

     
                        
            
     
    

    hope this helps.

提交回复
热议问题