Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL how to use ELSE in JSP

 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the <c:if .. statement in my JSP for if-condition check; but not sure the how to use the ELSE from the tag library. I could not see any such tag which supprt 'ELSE'.
I simply try using ><c:else> the jsps stops working and nothign displays on screen.



If any one already aware how to use ELSE here - please share with me.
THanks in advance,
Ramesh
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4313
233
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<c:if> doesn't support that. Instead, you can use <c:choose>, which has a <c:otherwise> part that gets invoked if no criteria was matched.
 
Prakash Dewangan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic