Re: problems when using logic tag with jsp scriptlet
Hi Laurie, Thanks for info and help. The problem looks rare. We load the example coming with Struts (struts-mailreader), it works, which use struts. That means application server is OK. The struts's , , and works fine except action servlet. We think there is only a little issue somewhere block action loading when it starts, which only applys to our application since other works (struts-mailreader). Thanks Jian --- Laurie Harper <[EMAIL PROTECTED]> wrote: > Sounds like a problem with your application server. > Runtime Expressions > are handled by it, not by Struts, so I don't think > this is a Struts issue. > > L. > > zuzg wrote: > > I'm sorry, the seconde code has some typing error, > is should be: > > value="1"> > > some other codes... > > > > > > > > > > > > zuzg wrote: > >> I am using struts 1.2.8 > >> in my jsp file, I wrote such codes: > >> value="<%= > >> Consts.PERSON_STATUS_YES%>"> > >> some other codes... > >> > >> > >> when running on tomcat5.0, it is ok, but when I > depoy it on another > >> middleware AS,I got an error:invalide tag lib > using, I can only change > >> value to a const like this: > >> value1"> > >> some other codes... > >> > >> it works. > >> > >> I want to know is that this problem is caused by > struts or that > >> middelware? though the AS is not well known,it > passed the J2EE > >> standards 1.4 certification(it's name is Kingdee > Apusic). > >> > >> > - > >> To unsubscribe, e-mail: > [EMAIL PROTECTED] > >> For additional commands, e-mail: > [EMAIL PROTECTED] > >> > >> > >> > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems when using logic tag with jsp scriptlet
Sounds like a problem with your application server. Runtime Expressions are handled by it, not by Struts, so I don't think this is a Struts issue. L. zuzg wrote: I'm sorry, the seconde code has some typing error, is should be: some other codes... zuzg wrote: I am using struts 1.2.8 in my jsp file, I wrote such codes: some other codes... when running on tomcat5.0, it is ok, but when I depoy it on another middleware AS,I got an error:invalide tag lib using, I can only change value to a const like this: some other codes... it works. I want to know is that this problem is caused by struts or that middelware? though the AS is not well known,it passed the J2EE standards 1.4 certification(it's name is Kingdee Apusic). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems when using logic tag with jsp scriptlet
I'm sorry, the seconde code has some typing error, is should be: some other codes... zuzg wrote: > > I am using struts 1.2.8 > in my jsp file, I wrote such codes: > > some other codes... > > > when running on tomcat5.0, it is ok, but when I depoy it on another > middleware AS,I got an error:invalide tag lib using, I can only change > value to a const like this: > > some other codes... > > it works. > > I want to know is that this problem is caused by struts or that > middelware? though the AS is not well known,it passed the J2EE > standards 1.4 certification(it's name is Kingdee Apusic). > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/problems-when-using-logic-tag-with-jsp-scriptlet-tf3695878.html#a10335091 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems when using logic tag with jsp scriptlet
I am using struts 1.2.8 in my jsp file, I wrote such codes: some other codes... when running on tomcat5.0, it is ok, but when I depoy it on another middleware AS,I got an error:invalide tag lib using, I can only change value to a const like this: some other codes... it works. I want to know is that this problem is caused by struts or that middelware? though the AS is not well known,it passed the J2EE standards 1.4 certification(it's name is Kingdee Apusic). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Statements (if/else) Using logic tag
J Gotsch wrote: > I guess my problem is larger than using an if/else statement. This much is certainly true ;) > I figured how to do that, but I'm iterating over a List in the JSP, and want > to be able to exit the loop whenever certain item exist. I don't suppose > there's a way to do that, is there? > > My requirement in a nutshell: the List could have role1, role2, and role3. > But I can only print one role on the screen. If the list has multiple roles, > then my loop will show all of them. I want to be able to exit the loop after > I find the role that I'm looking for. > If you can only have one role on the screen why are you iterating at all? Just use a sequence of if-thens, preferably using JSTL thingies. Do you have an extensible list of possible roles?! If so I would consider using a different mechanism than this; it will only lead to tears. Perhaps an inclusion of a separate page, the name of which is built using a known string concatenated with the role, etc. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Conditional Statements (if/else) Using logic tag
Filter the List before sent to jsp, can you do it? or you must do it in jsp? you can implement your own custom tag extending iterate. Other solution is to define a variable in jsp with c:set when you found and item, and only print when variable isn't set or false. Take a look to jstl common tags. El dom, 14 de 05 de 2006 a las 18:49, J Gotsch escribió: > I guess my problem is larger than using an if/else statement. I figured how > to do that, but I'm iterating over a List in the JSP, and want to be able to > exit the loop whenever certain item exist. I don't suppose there's a way to > do that, is there? > > My requirement in a nutshell: the List could have role1, role2, and role3. > But I can only print one role on the screen. If the list has multiple roles, > then my loop will show all of them. I want to be able to exit the loop after > I find the role that I'm looking for. > > > > Philihp Busby <[EMAIL PROTECTED]> wrote: > Jerome is referring to tags in the JSTL Core tag library. > > > > > > > > > mmm code-bloat. > > On 5/14/06, J Gotsch wrote: > > Which package does this belong to? I can't find it anywhere. > > > > Jerome Gagner > wrote: > > use > > > > On 5/13/06, J Gotsch wrote: > > > Hello All, > > > > > > How do I perform an If/else with ? > > > > > > In the below logic:iterate tag, If my collection contains both ROLE1 AND > > > ROLE2, Then both statements will be displayed. And that's now what I want. > > > > > > I want to implement something like this: > > > > > > if(securityRoleName.equals("ROLE1")) > > > // print You have ROLE1 ! > > > else if (securityRoleName.equals("ROLE1")) > > > //print You have ROLE2 ! > > > else > > > //print you have NO ROLE! > > > > > > This is what I have now: > > > > > > > property="xyz" scope="session"> > > > > > > > property="securityRoleName" value="ROLE1"> > > > You have ROLE1 ! > > > > > > > property="securityRoleName" value="ROLE2"> > > > You have ROLE1 ! > > > > > > > property="securityRoleName"> > > > You have no ROLE! > > > > > > > > > > > > > > > > > > - > > > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! > > > Messenger with Voice. > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > - > > Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just > > 2¢/min with Yahoo! Messenger with Voice. > > > > > > - > Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min > with Yahoo! Messenger with Voice. -- ;-) Jorge Martin Cuervo Analista Programador Outsourcing Emarketplace deFacto Powered by Standards email <[EMAIL PROTECTED]> voz +34 985 129 820 voz +34 660 026 384
Re: Conditional Statements (if/else) Using logic tag
I guess my problem is larger than using an if/else statement. I figured how to do that, but I'm iterating over a List in the JSP, and want to be able to exit the loop whenever certain item exist. I don't suppose there's a way to do that, is there? My requirement in a nutshell: the List could have role1, role2, and role3. But I can only print one role on the screen. If the list has multiple roles, then my loop will show all of them. I want to be able to exit the loop after I find the role that I'm looking for. Philihp Busby <[EMAIL PROTECTED]> wrote: Jerome is referring to tags in the JSTL Core tag library. mmm code-bloat. On 5/14/06, J Gotsch wrote: > Which package does this belong to? I can't find it anywhere. > > Jerome Gagner wrote: > use > > On 5/13/06, J Gotsch wrote: > > Hello All, > > > > How do I perform an If/else with ? > > > > In the below logic:iterate tag, If my collection contains both ROLE1 AND > > ROLE2, Then both statements will be displayed. And that's now what I want. > > > > I want to implement something like this: > > > > if(securityRoleName.equals("ROLE1")) > > // print You have ROLE1 ! > > else if (securityRoleName.equals("ROLE1")) > > //print You have ROLE2 ! > > else > > //print you have NO ROLE! > > > > This is what I have now: > > > > > property="xyz" scope="session"> > > > > > property="securityRoleName" value="ROLE1"> > > You have ROLE1 ! > > > > > property="securityRoleName" value="ROLE2"> > > You have ROLE1 ! > > > > > property="securityRoleName"> > > You have no ROLE! > > > > > > > > > > > > - > > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! > > Messenger with Voice. > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > - > Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min > with Yahoo! Messenger with Voice. > - Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Re: Conditional Statements (if/else) Using logic tag
Jerome is referring to tags in the JSTL Core tag library. mmm code-bloat. On 5/14/06, J Gotsch <[EMAIL PROTECTED]> wrote: Which package does this belong to? I can't find it anywhere. Jerome Gagner <[EMAIL PROTECTED]> wrote: use On 5/13/06, J Gotsch wrote: > Hello All, > > How do I perform an If/else with ? > > In the below logic:iterate tag, If my collection contains both ROLE1 AND ROLE2, Then both statements will be displayed. And that's now what I want. > > I want to implement something like this: > > if(securityRoleName.equals("ROLE1")) > // print You have ROLE1 ! > else if (securityRoleName.equals("ROLE1")) > //print You have ROLE2 ! > else > //print you have NO ROLE! > > This is what I have now: > > > property="xyz" scope="session"> > > > property="securityRoleName" value="ROLE1"> > You have ROLE1 ! > > > property="securityRoleName" value="ROLE2"> > You have ROLE1 ! > > > property="securityRoleName"> > You have no ROLE! > > > > > > - > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Re: Conditional Statements (if/else) Using logic tag
Which package does this belong to? I can't find it anywhere. Jerome Gagner <[EMAIL PROTECTED]> wrote: use On 5/13/06, J Gotsch wrote: > Hello All, > > How do I perform an If/else with ? > > In the below logic:iterate tag, If my collection contains both ROLE1 AND > ROLE2, Then both statements will be displayed. And that's now what I want. > > I want to implement something like this: > > if(securityRoleName.equals("ROLE1")) > // print You have ROLE1 ! > else if (securityRoleName.equals("ROLE1")) > //print You have ROLE2 ! > else > //print you have NO ROLE! > > This is what I have now: > > > property="xyz" scope="session"> > > > property="securityRoleName" value="ROLE1"> > You have ROLE1 ! > > > property="securityRoleName" value="ROLE2"> > You have ROLE1 ! > > > property="securityRoleName"> > You have no ROLE! > > > > > > - > Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! > Messenger with Voice. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice.
Re: Conditional Statements (if/else) Using logic tag
use On 5/13/06, J Gotsch <[EMAIL PROTECTED]> wrote: Hello All, How do I perform an If/else with ? In the below logic:iterate tag, If my collection contains both ROLE1 AND ROLE2, Then both statements will be displayed. And that's now what I want. I want to implement something like this: if(securityRoleName.equals("ROLE1")) // print You have ROLE1 ! else if (securityRoleName.equals("ROLE1")) //print You have ROLE2 ! else //print you have NO ROLE! This is what I have now: You have ROLE1 ! You have ROLE1 ! You have no ROLE! - Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Conditional Statements (if/else) Using logic tag
Hello All, How do I perform an If/else with ? In the below logic:iterate tag, If my collection contains both ROLE1 AND ROLE2, Then both statements will be displayed. And that's now what I want. I want to implement something like this: if(securityRoleName.equals("ROLE1")) // print You have ROLE1 ! else if (securityRoleName.equals("ROLE1")) //print You have ROLE2 ! else //print you have NO ROLE! This is what I have now: You have ROLE1 ! You have ROLE1 ! You have no ROLE! - Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
using logic tag
I am using struts 1.1 I using logic equal tag to check whether a page context attribute value. here is my code So only one logic equal will be true but not both .But when I call this jsp in the browser I get jsp exception OracleJSP: oracle.jsp.parse.JspParseException: Line # 220, Error: Tag attempted to define a bean which already exists: test1 Why should I get this error when only one condition is true Thanks & regards - Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze.