Solved

no select-case in jsp?

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Exception creating bean of class 5 236
bean mapper frameworks 5 68
IE doesn't Invoke servlet in iframe 1 130
tomcat startup error 5 167
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
Deploying our service is a grudge match between customer benefits and customer pain. In one corner, rolling out fixes (yay!) and delivering new features (double yay!). In the other corner, training on new features (boo – sounds like work), and chan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

732 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