Solved

no select-case in jsp?

Posted on 2004-04-26
2
859 Views
Last Modified: 2010-08-05
hi,

another question.  i have different case and want to do things differently.  does java have a select-case or do i have to use long if/else if statements?

mskim100
0
Comment
Question by:mskim100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
ldbkutty earned 50 total points
ID: 10924037
No need of long if/else statements...use select..case in the usual way as follows:

switch(type)
{

case type1: {
// Actions...
break;
}

case 2: {
//Actions...
break;
}

}

Hope this helps...
0
 
LVL 27

Expert Comment

by:rrz
ID: 10924088
If you can use JSTL, then you could use  
<c:choose>, <c:when>, and <c:otherwise>   tags.        
 rrz
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
If you are IT support and need to work after hours to resolve customer issues then here are a few tips on how to handle after hours support
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question