Solved

no select-case in jsp?

Posted on 2004-04-26
2
860 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

Technology Partners: 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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

630 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