Solved

no select-case in jsp?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There is no doubt that cloud is gaining importance. Many of you must have read about this technology and its growing importance. More and more organisations are embracing this technology not forgetting start-ups. The process begins by dipping …
When we talk about DevOps toolchains, I sometimes wonder how many people really get what we’re talking about. I don’t know if it’s just semantics or tone or something else, but sometimes I think it just sounds like buzzword sausage. So it’s always …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now