I forgot to paste it in:
String dept = rset.getString("DEPARTMENT"); ---- from my Oracle Query switch(dept) { case "FAO": out.println("It\'s FAO."); break; case "CAO": out.println("It\'s CAO."); break; case RES: out.println("It\'s RES."); break; default: out.println("It is a different one."); } This is my first try at Java/JSP so this is only an example that I am trying to get working before I add the real logic to it. I figured out the query and the result set and looping over the result set -- sorry nothing beats CFQUERY but this SWITCH statement is confusing me. Thanks Mario -----Original Message----- From: Matthew Small [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:59 AM To: CF-Talk Subject: RE: Question for Java people on this list: Converting a CF app to JS P Show the JSP example also. Matthew Small Web Developer American City Business Journals 704-973-1045 [EMAIL PROTECTED] -----Original Message----- From: Ciliotta, Mario [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 9:55 AM To: CF-Talk Subject: Question for Java people on this list: Converting a CF app to JS P Hi, I was wondering if someone on this might have experience using the SWITCH statement in JSP. I am in the process of converting a CF app to JSP (Do not ask why -- company standards for the future) and in the CF page I make use of the <CFSWITCH> and I looked into JSP/Java and there is also a switch statement but I cannot get it to work correctly. Here is a CF example: <cfswitch expression="#Trim(Department)#"> <cfcase value="FAO"> <cfset rate=".09"> </cfcase> <cfcase value="CAO"> <cfset rate=".19"> </cfcase> <cfcase value="RES"> <cfset rate=".39"> </cfcase> <cfdefaultcase> <cfset rate=".09"> </cfdefaultcase> </cfswitch> Does anyone know if this can be done with the SWITCh statement in JSP. Can switch be used on strings --- I have been told yes and no by different people but I cannot get past the problem. Thanks Mario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188927 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54