Re: JSP variable in nested Tags
I have a feeling that this is not orion-specific (websphere ie tomcat does this too) if you have any spaces between and % then you will encounter this problem. [EMAIL PROTECTED] 05/24/01 04:58am I have an interesting little problem. I am using the Jakarta input:textarea ... tags inside an iterate tag. One of the attributes of the input:textarea ... is name, which I am setting using name=%= myVar.getMyProp %. This works fine, until I put text in front of the %. If I do that, it sends the literal string instead of the value of the variable. Example 1 (Works): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=1001/textarea Example 2 (Fails): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=comment%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=commentlt;% out.print(orderItem.getOrderItemID());%gt;/textarea I have looked at the JSP 1.1 specification, but couldn't find anything that said it should be processed one way or the other. I have a feeling that this is an Orion specific issue, but can't find out which way is correct to submit a bug report. Does anyone on the list have a resource to point me to on this issue? Thanks in advance for your help. OS: Win2k Ver: Orion 1.5.1 JDK: 1.3 - Ernie Phelps
RE: JSP variable in nested Tags
Scott, Thanks for the tip, but in this case I went back and ensured that there were no spaces between. Still have the same issue. - E -Original Message- From: SCOTT FARQUHAR [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 24, 2001 6:13 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: JSP variable in nested Tags I have a feeling that this is not orion-specific (websphere ie tomcat does this too) if you have any spaces between and % then you will encounter this problem. [EMAIL PROTECTED] 05/24/01 04:58am I have an interesting little problem. I am using the Jakarta input:textarea ... tags inside an iterate tag. One of the attributes of the input:textarea ... is name, which I am setting using name=%= myVar.getMyProp %. This works fine, until I put text in front of the %. If I do that, it sends the literal string instead of the value of the variable. Example 1 (Works): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=1001/textarea Example 2 (Fails): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=comment%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=commentlt;% out.print(orderItem.getOrderItemID());%gt;/textarea I have looked at the JSP 1.1 specification, but couldn't find anything that said it should be processed one way or the other. I have a feeling that this is an Orion specific issue, but can't find out which way is correct to submit a bug report. Does anyone on the list have a resource to point me to on this issue? Thanks in advance for your help. OS: Win2k Ver: Orion 1.5.1 JDK: 1.3 - Ernie Phelps
RE: JSP variable in nested Tags
Thanks to all for the suggestions. I have two work arounds, thanks to ideas from the list. However, I was looking to see if anyone could tell whether the specification dealt with how this should be handled, or if it was nebulous, or if it was specifically left up to the implementer to decide. I looked it over, but really didn't see anything. Thanks again for all the input and helpful suggestions. - Ernie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Hubbach Sent: Thursday, May 24, 2001 9:31 AM To: Orion-Interest Subject: Re:JSP variable in nested Tags Ernie, I just had an idea. Why don't you put the whole string in the scriplet, so instead of input:textarea name=comment%= orderItem.getOrderItemID()% you'd have input:textarea name=%= comment + orderItem.getOrderItemID() % That way you just avoid the whole thing. Jeff. -- Jeff Hubbach Internet Developer New Media Designs, Inc. www.nmd.com
JSP variable in nested Tags
I have an interesting little problem. I am using the Jakarta input:textarea ... tags inside an iterate tag. One of the attributes of the input:textarea ... is name, which I am setting using name=%= myVar.getMyProp %. This works fine, until I put text in front of the %. If I do that, it sends the literal string instead of the value of the variable. Example 1 (Works): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=1001/textarea Example 2 (Fails): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=comment%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=commentlt;% out.print(orderItem.getOrderItemID());%gt;/textarea I have looked at the JSP 1.1 specification, but couldn't find anything that said it should be processed one way or the other. I have a feeling that this is an Orion specific issue, but can't find out which way is correct to submit a bug report. Does anyone on the list have a resource to point me to on this issue? Thanks in advance for your help. OS: Win2k Ver: Orion 1.5.1 JDK: 1.3 - Ernie Phelps
Re: JSP variable in nested Tags
snip Example 2 (Fails): ejb:iterate id=orderItem type=OrderItem collection=%= col % input:textarea name=comment%= orderItem.getOrderItemID()% attributes=%= commentTable%/ /ejb:iterate Produces: textarea name=commentlt;% out.print(orderItem.getOrderItemID());%gt;/textarea snip you could put the attributes text inside the %= like this: %= attributes + orderItem.getOrderItemID()% __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/