File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes JSTL how to use ELSE in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL how to use ELSE in JSP" Watch "JSTL how to use ELSE in JSP" New topic
Author

JSTL how to use ELSE in JSP

Ramesh Kumar Swarnkar
Ranch Hand

Joined: Sep 15, 2003
Posts: 84
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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3060
    
  38

<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.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Prakash Dewangan
Greenhorn

Joined: Jan 21, 2011
Posts: 5
Please use

 
 
subject: JSTL how to use ELSE in JSP