Internationalization
Hey gang, I've been busy doing I18N for our site using the JSTL internationalisation features. What I miss there and could really use is a tag-alternative for the ChoiceFormat java-class. If need be I could of course create one of my own, but if there is one already I'd really rather use it. Does anybody know of something like that? Also, are the non-standard I18N taglibs deprecated or something? They're very similar to the standard ones, but have different attribs etc. Greetings, Martin van Dijken - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the size of a java.util.List object in EL?
Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the size of a java.util.List object in EL?
This has been on the list before I think. The recommended solution appears to be to replace your List class with a ListBean which contains a getSize method. Would probably be useful if Taglib project could have these classes available for download. Anyone implemented these and feel like offering them up? Another option is to have a tag to get it. Maybe Xephyrus could add it to their datastruct taglib: http://www.xephyrus.com/taglib-datastructs/reference.html Hen On Wed, 17 Sep 2003, Adam Hardy wrote: Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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: How to get the size of a java.util.List object in EL?
Hi guys I think this has been discussed in this list about 3.7 million times, so check out the archives... The short answer is: You can't. Best regards, Eric -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 17. September 2003 13:39 To: Tag Libraries Users List Subject: Re: How to get the size of a java.util.List object in EL? Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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: How to get the size of a java.util.List object in EL?
Hey guys, I think this can be accomplished although not directly. I must admit it's a terrible hack, so decide for yourself if you want to use this. I don't exactly have a test situation, so I can't really test this, but try: c:forEach items=${browseForm.map.colInfoList} begin=0 end=0 varStatus=status c:out value=${status.count}/ /c:forEach This only shows the count if there is at least one item in your list, but I think you can check for yourself whether something was printed. Greetz, Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 17 september 2003 13:53 To: [EMAIL PROTECTED] Subject: RE: How to get the size of a java.util.List object in EL? Hi guys I think this has been discussed in this list about 3.7 million times, so check out the archives... The short answer is: You can't. Best regards, Eric -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 17. September 2003 13:39 To: Tag Libraries Users List Subject: Re: How to get the size of a java.util.List object in EL? Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to get the size of a java.util.List object in EL?
Oops, Guess I spoke a little too fast there. The count does not, like I thought, expose the list size, but the count of how many iterations have passed. Sorry, no go, Martin -Original Message- From: Martin van Dijken Sent: woensdag 17 september 2003 14:02 To: Tag Libraries Users List Subject: RE: How to get the size of a java.util.List object in EL? Hey guys, I think this can be accomplished although not directly. I must admit it's a terrible hack, so decide for yourself if you want to use this. I don't exactly have a test situation, so I can't really test this, but try: c:forEach items=${browseForm.map.colInfoList} begin=0 end=0 varStatus=status c:out value=${status.count}/ /c:forEach This only shows the count if there is at least one item in your list, but I think you can check for yourself whether something was printed. Greetz, Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 17 september 2003 13:53 To: [EMAIL PROTECTED] Subject: RE: How to get the size of a java.util.List object in EL? Hi guys I think this has been discussed in this list about 3.7 million times, so check out the archives... The short answer is: You can't. Best regards, Eric -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 17. September 2003 13:39 To: Tag Libraries Users List Subject: Re: How to get the size of a java.util.List object in EL? Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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] - 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: How Can I Write To The Servlet Log Using JSTL?
Thank you, Serge, I'll look elsewhere. I just wanted to make sure that I wasn't overlooking something out of ignorance. - MOD --- Serge Knystautas [EMAIL PROTECTED] wrote: Michael Duffy wrote: What's the proper idiom to write to the Web app log from a JSP using JSTL? Is it possible to do with JSTL only, or is scriptlet code required? Same for writing to the file system - how do I do it? JSTL is the JSP standard tag library, so it just attempts to define the most common actions. You'll have to use other taglibs to provide log and file operations. Those tags may/may not support EL, which may be what you are really looking for. -- Serge Knystautas President Lokitech software . strategy . design http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the size of a java.util.List object in EL?
Well, since we're getting into terrible hacks territory, how about: c:set var=so_far value=0/ c:forEach items=${browseForm.map.colInfoList} varStatus=status c:set var=so_far value=${status.count}/ /c:forEach c:out value=${so_far} / :) On 09/17/2003 02:05 PM Martin van Dijken wrote: Oops, Guess I spoke a little too fast there. The count does not, like I thought, expose the list size, but the count of how many iterations have passed. Sorry, no go, Martin -Original Message- From: Martin van Dijken Sent: woensdag 17 september 2003 14:02 To: Tag Libraries Users List Subject: RE: How to get the size of a java.util.List object in EL? Hey guys, I think this can be accomplished although not directly. I must admit it's a terrible hack, so decide for yourself if you want to use this. I don't exactly have a test situation, so I can't really test this, but try: c:forEach items=${browseForm.map.colInfoList} begin=0 end=0 varStatus=status c:out value=${status.count}/ /c:forEach This only shows the count if there is at least one item in your list, but I think you can check for yourself whether something was printed. Greetz, Martin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: woensdag 17 september 2003 13:53 To: [EMAIL PROTECTED] Subject: RE: How to get the size of a java.util.List object in EL? Hi guys I think this has been discussed in this list about 3.7 million times, so check out the archives... The short answer is: You can't. Best regards, Eric -Original Message- From: Adam Hardy [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 17. September 2003 13:39 To: Tag Libraries Users List Subject: Re: How to get the size of a java.util.List object in EL? Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - 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] - 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] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
c:import
I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: import
Have you imported the core tag library at the top of your page? I always forget to do this and wonder why functionlaity is not working. Chris -Original Message- From: Billy Bacon [mailto:[EMAIL PROTECTED] Sent: 17 September 2003 17:22 To: Tag Libraries Users List Subject: c:import I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority Visit our website at http://www.rbs.co.uk/CBFM/ *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - 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: How to get the size of a java.util.List object in EL?
Adam, JSP 2.0 introduces the notion of functions within EL, and in step with that release, JSTL 1.1 will include some standard functions including size. There are early releases like Tomcat 5.0 and Resin 3.0 that give you some features of JSP 2.0, although I haven't tried either. Hopefully the specs will get finalized to get these standards out there soon. -- Serge Knystautas President Lokitech software . strategy . design http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] Adam Hardy wrote: Hi Billy, I don't know about this one. Maybe someone more guru-like will step up with an answer 8-) I'm not quite sure why EL doesn't like this but I think it's because the List class is not a javabean - presumably EL looks for getSize() rather than the actual size(), but that doesn't explain why it's complaining about an integer. Adam On 09/17/2003 02:19 AM Billy Bacon wrote: I need to get the size (as an int) of a java.util.List I have. The following doesn't work c:out value=Size = ${browseForm.map.colInfoList.size}/ It gives me the following exception... ServletException in:/jsp/browseQueueBody.jsp] An error occurred while evaluating custom action attribute value with value Size = ${browseForm.map.colInfoList.size}: The . operator was supplied with an index value of type java.lang.String to be applied to a List or array, but that value cannot be converted to an integer. (null)' Does anyone know how I could get the size of the List? - Billy - - 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: c:import
Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
I tried catching any exceptions and nothing was printed to the screen :-/ On 9/17/03 10:41 AM, Rick Ross [EMAIL PROTECTED] wrote: Also, you might wanna do this to see if an error occurred: c:catch var=ex c:import url=${viewPage}/ /c:catch c:if test=${not empty ex} c:out value=${ex} / /c:if Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
It's a scoped variable. But I think the problem is elsewhere because even this doesn't work for me and no exception is thrown... c:import url=myJspPage.jsp / Any ideas? On 9/17/03 11:34 AM, Kris Schneider [EMAIL PROTECTED] wrote: Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Have you tried a context-relative path (starts with /) to the page? Quoting Billy Bacon [EMAIL PROTECTED]: It's a scoped variable. But I think the problem is elsewhere because even this doesn't work for me and no exception is thrown... c:import url=myJspPage.jsp / Any ideas? On 9/17/03 11:34 AM, Kris Schneider [EMAIL PROTECTED] wrote: Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use JSTL to output a path in the containor
I need to out put a path inside of the containor. The path is img src =%= request.getContextPath() + / + ((Member)request.getSession().getAttribute(member)).getPhotoPath() % align=middle in the script form. If I use the c:out tag, the JSP page path is attached to the front of the path. I also have tried the c:url and have the same result. How I can get the path right using a JSTL tag? Thanks, Vernon University of Phoenix Online. Free Information - Online Classes http://r.hotbot.com/r/lmt_uopo/http://servedby.advertising.com/click/site=563632/mnum=125825 This offer applies to U.S. Residents Only - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Awesome. That worked! Thanks Kris! - Billy - On 9/17/03 12:05 PM, Kris Schneider [EMAIL PROTECTED] wrote: Have you tried a context-relative path (starts with /) to the page? Quoting Billy Bacon [EMAIL PROTECTED]: It's a scoped variable. But I think the problem is elsewhere because even this doesn't work for me and no exception is thrown... c:import url=myJspPage.jsp / Any ideas? On 9/17/03 11:34 AM, Kris Schneider [EMAIL PROTECTED] wrote: Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Use JSTL to output a path in the containor
Seems like this should work: img src=c:url value=/${sessionScope.member.photoPath}/ ... Please give an example of what you've tried with c:url and what the resulting output was. Quoting Vernon Smith [EMAIL PROTECTED]: I need to out put a path inside of the containor. The path is img src =%= request.getContextPath() + / + ((Member)request.getSession().getAttribute(member)).getPhotoPath() % align=middle in the script form. If I use the c:out tag, the JSP page path is attached to the front of the path. I also have tried the c:url and have the same result. How I can get the path right using a JSTL tag? Thanks, Vernon University of Phoenix Online. Free Information - Online Classes http://r.hotbot.com/r/lmt_uopo/http://servedby.advertising.com/click/site=563632/mnum=125825 This offer applies to U.S. Residents Only -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using c_rt:out with scoped variables
Using nested tags, I am not able to access the value of a scoped variable set by the parent tag: jsp:useBean id=file scope=application class=myPkg.ReadWriteRepositoryFile/ table c_rt:forTokens var=repo_names items=%= file.getContents() % delims=; trtd c_rt:out value=%= pageContext.getAttribute(repo_names, PageContext.PAGE_SCOPE) % default=test/ /td/tr /c_rt:forTokens /table I've looked at javax.servlet.jsp.jstl.core.TagLoopSupport and the source code is definitely setting variable scope, so what am I doing wrong? I've also tried using pageContext.findAttribute(repo_names) but that didn't work. My default value doesn't display either. Thanks for your time and consideration. Cheers, Chris _ Compare Cable, DSL or Satellite plans: As low as $29.95. https://broadband.msn.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Okay, that's good, but I use page-relative paths successfully with c:import all the time. Are you sure the page doing the import is in the same directory as the page being imported? Quoting Billy Bacon [EMAIL PROTECTED]: Awesome. That worked! Thanks Kris! - Billy - On 9/17/03 12:05 PM, Kris Schneider [EMAIL PROTECTED] wrote: Have you tried a context-relative path (starts with /) to the page? Quoting Billy Bacon [EMAIL PROTECTED]: It's a scoped variable. But I think the problem is elsewhere because even this doesn't work for me and no exception is thrown... c:import url=myJspPage.jsp / Any ideas? On 9/17/03 11:34 AM, Kris Schneider [EMAIL PROTECTED] wrote: Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
c:url question
I'm following the recommendations laid out by Shawn Bayern in JSTL In Action, but I've run into a snag. On page 136, Shawn recommends using the c:url tag for referring to a directory named images in a Web application: body background=c:url value='/images/gray.jpg'/ !-- other HTML stuff in here /body When I ask Tomcat to send this page, the background is not there. When I View Source to look at the HTML, I see this: body background=/mock-trading-partner/images/gray.jpg;jsessionid=9B0DA55495E2CD9BF40AAD98A4E115D8 Looks to me like that jsessionid is making it so I can't find the background. How do I get rid of it? Thanks - MOD __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import
Yep, all my JSPs are in the same directory. c:import url=xyz.jsp/ // didn't work c:import url=/jsp/xyz.jsp/ // did the trick. Dunno... On 9/17/03 1:14 PM, Kris Schneider [EMAIL PROTECTED] wrote: Okay, that's good, but I use page-relative paths successfully with c:import all the time. Are you sure the page doing the import is in the same directory as the page being imported? Quoting Billy Bacon [EMAIL PROTECTED]: Awesome. That worked! Thanks Kris! - Billy - On 9/17/03 12:05 PM, Kris Schneider [EMAIL PROTECTED] wrote: Have you tried a context-relative path (starts with /) to the page? Quoting Billy Bacon [EMAIL PROTECTED]: It's a scoped variable. But I think the problem is elsewhere because even this doesn't work for me and no exception is thrown... c:import url=myJspPage.jsp / Any ideas? On 9/17/03 11:34 AM, Kris Schneider [EMAIL PROTECTED] wrote: Is xyz only a scripting variable or is it also a scoped variable? Quoting Billy Bacon [EMAIL PROTECTED]: Yes, I am importing the core library, I have plenty of other c: tags within my jsp and they work perfectly that's why it confuses me that's it not working. Seems like a pretty simple tag to use. Before trying to convert this to JSTL I had bean:define tag (from Struts) and a jsp:include page=%= xyz %/ tag and things worked fine. But now I get nothing... On 9/17/03 10:38 AM, Rick Ross [EMAIL PROTECTED] wrote: Make sure that you are clear on the differences between c:import jsp:include and @include they are all different and in my case the fact that the imported page has no knowledge of my context hosed me. R Billy Bacon wrote: I've looked through the archives and the suggested alternative for a dynamic jsp:include reference is using the c:import url=${xyz}/. This is not working in my JSP. The tag is including nothing in my page. I've even tried to give it a static reference to the jsp c:import url=xyzPage.jsp/ and still nothing. Does anyone know what's wrong? - Billy - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:url question
The next time you hit the page it works though, right? If you're tracking sessions via cookies, subsequent responses won't need to do URL rewriting. It actually looks like it's a server bug. Hitting http://www.sun.com/im/sun_logo.gif;jsessionid=foo works just fine (SunONE WebServer 6.0), whereas hitting http://www.apache.org/images/asf_logo_wide.gif;jsessionid=foo results in a 404 (Apache/2.0.48-dev (Unix)). Same here ;-) (Microsoft-IIS/6.0) http://www.microsoft.com/homepage/gif/bnr-microsoft.gif;jsessionid=foo You might try something like: body background=c:out value=${pageContext.request.contextPath}/images/gray.jpg/ Quoting Michael Duffy [EMAIL PROTECTED]: I'm following the recommendations laid out by Shawn Bayern in JSTL In Action, but I've run into a snag. On page 136, Shawn recommends using the c:url tag for referring to a directory named images in a Web application: body background=c:url value='/images/gray.jpg'/ !-- other HTML stuff in here /body When I ask Tomcat to send this page, the background is not there. When I View Source to look at the HTML, I see this: body background=/mock-trading-partner/images/gray.jpg;jsessionid=9B0DA55495E2CD9BF40AAD98A4E115D8 Looks to me like that jsessionid is making it so I can't find the background. How do I get rid of it? Thanks - MOD -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]