<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META content="MSHTML 6.00.6002.18226" name=GENERATOR></HEAD>
<BODY id=role_body style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial" bottomMargin=7 leftMargin=7 topMargin=7 rightMargin=7><FONT id=role_document face=Arial color=#000000 size=2>
<DIV>Thank you so much for your suggestion. I did finally find a solution
but I may experiment with these ideas as well.</DIV>
<DIV> </DIV>
<DIV>Lynn</DIV>
<DIV> </DIV>
<DIV>
<DIV>In a message dated 4/21/2010 2:58:02 A.M. Central Daylight Time, yg@mind.lu
writes:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: blue 2px solid"><FONT style="BACKGROUND-COLOR: transparent" face=Arial color=#000000 size=2>Hi
Lynn,<BR><BR>the cms:titleTag was a hypotethical proposal in my original
question.<BR><BR>Try to use cms:property, that does what you
need:<BR><BR><cms:property name='Title' file='/en/sitemap.html' />
or<BR><cms:property name='Title' file='${myVar}' /><BR><BR>read more
about it here:<BR><A title=http://www.bng-galiza.org/opencms/opencms/alkacon-documentation/documentation_taglib/docu_tag_property.html href="http://www.bng-galiza.org/opencms/opencms/alkacon-documentation/documentation_taglib/docu_tag_property.html">http://www.bng-galiza.org/opencms/opencms/alkacon-documentation/documentation_taglib/docu_tag_property.html</A><BR><BR>yves<BR><BR>
<DIV class=gmail_quote>On 21 April 2010 04:00, chapmanl99 <SPAN dir=ltr><<A title=mailto:chapmanl99@aol.com href="mailto:chapmanl99@aol.com">chapmanl99@aol.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid"><BR>I
would like to use this code but give it a variable containing the
filename.<BR>I'm trying to produce a list of files in a folder using the
Title property<BR>of each file. There are several code examples on the
web but none that I<BR>can find work correctly. This is what I have so
far. I used your suggestion<BR>for the two cms tagTitle lines but they
produce an error.<BR><BR><%@ page session="false" buffer="none"
import="java.sql.*, com.onr.*,<BR>java.util.*,org.opencms.search.*,
org.opencms.flex.*, org.opencms.util.*,<BR>org.opencms.jsp.*,
org.opencms.frontend.templateone.modules.*,<BR>org.opencms.main.*,
org.opencms.file.*" %><BR><%@ taglib prefix="cms" uri="<A title=http://www.opencms.org/taglib/cms href="http://www.opencms.org/taglib/cms" target=_blank>http://www.opencms.org/taglib/cms</A>"
%><BR><jsp:useBean id="cmsUser"
class="org.opencms.jsp.CmsJspActionElement"><BR><%
cmsUser.init(pageContext, request, response);
%><BR></jsp:useBean><BR><%<BR><BR>CmsJspActionElement action =
new<BR>CmsJspActionElement(pageContext,request,response);<BR>CmsObject cms =
action.getCmsObject();<BR><BR>try {<BR><BR> List
listFolders =<BR>cms.getSubFolders(<A title=http://action.info/ href="http://action.info/" target=_blank>action.info</A>("opencms.request.folder"));<BR>
CmsFolder cmsfolder= null;<BR>
for(int i=0;i<listFolders.size();i++){<BR>
cmsfolder=(CmsFolder)
listFolders.get(i);<BR>%><BR>
"<cms:link
/<%=cmsfolder.getName()%></cms:link>"><%=cmsfolder.getName()%><BR><%
out.println("<br>");<BR>
}<BR><BR> List listFiles
=<BR>cms.getFilesInFolder(<A title=http://action.info/ href="http://action.info/" target=_blank>action.info</A>("opencms.request.folder"));<BR>
for(int i=0;i<listFiles.size();i++){<BR>
CmsFile cmsfile= (CmsFile)
listFiles.get(i);<BR>
String propertyname = "title";<BR>
String filename =
cmsfile.getName();<BR>%><BR><BR>
<cms:titleTag file='site-event-reporting.jsp'/><BR>
<cms:titleTag file =
filename/><BR><BR><BR>
"<cms:link
/<%=cmsfile.getName()%></cms:link>"><%=cmsfile.getName()%><BR><%
out.println("<br>");<BR> }<BR><BR>}
catch (CmsException e) {<BR>
out.println(e);<BR>}<BR>%><BR><BR> These two lines in the
middle of the code:<BR>
<cms:titleTag file='site-event-reporting.jsp'/><BR>
<cms:titleTag file =
filename/><BR><BR>do not work for me. I get "No tag "titleTag"
defined in the library<BR>imported with prefix cms" error. I'm using
opencms 6. Could that be the<BR>problem. I would appreciate any
help with this.<BR>Lynn<BR>
<DIV>
<DIV></DIV>
<DIV class=h5><BR><BR><BR>Yves Glodt-5 wrote:<BR>><BR>> On Wednesday
18 February 2009, Yves Glodt wrote:<BR>>>
Hello,<BR>>><BR>>> is there a way to get the title of a resource
with an opencms tag, à la<BR>>> <cms:titleTag
file="/folder/file.html" /> ?<BR>><BR>> Fool, of course it
is!<BR>><BR>> <cms:property name='Title' file='/en/sitemap.html'
/><BR>><BR>> doc-reading helps... :-)<BR>><BR>>> best
regards,<BR>>> Yves<BR>>><BR>>><BR>>>
_______________________________________________<BR>>> This mail is
sent to you from the opencms-dev mailing list<BR>>> To change your
list options, or to unsubscribe from the list, please<BR>>>
visit<BR>>> <A title=http://lists.opencms.org/mailman/listinfo/opencms-dev href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target=_blank>http://lists.opencms.org/mailman/listinfo/opencms-dev</A><BR>><BR>><BR>><BR>><BR>>
_______________________________________________<BR>> This mail is sent to
you from the opencms-dev mailing list<BR>> To change your list options,
or to unsubscribe from the list, please visit<BR>> <A title=http://lists.opencms.org/mailman/listinfo/opencms-dev href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target=_blank>http://lists.opencms.org/mailman/listinfo/opencms-dev</A><BR>><BR><BR></DIV></DIV><FONT color=#888888>--<BR>View this message in context: <A title=http://old.nabble.com/get-title-of-resource-with-jstl-tp22080788p28287942.html href="http://old.nabble.com/get-title-of-resource-with-jstl-tp22080788p28287942.html" target=_blank>http://old.nabble.com/get-title-of-resource-with-jstl-tp22080788p28287942.html</A><BR>Sent
from the OpenCMS - Dev mailing list archive at Nabble.com.<BR></FONT>
<DIV>
<DIV></DIV>
<DIV class=h5><BR><BR>_______________________________________________<BR>This
mail is sent to you from the opencms-dev mailing list<BR>To change your list
options, or to unsubscribe from the list, please visit<BR><A title=http://lists.opencms.org/mailman/listinfo/opencms-dev href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target=_blank>http://lists.opencms.org/mailman/listinfo/opencms-dev</A></DIV></DIV></BLOCKQUOTE></DIV><BR><BR><BR><BR>_______________________________________________<BR>This
mail is sent to you from the opencms-dev mailing list<BR>To change your list
options, or to unsubscribe from the list, please
visit<BR>http://lists.opencms.org/mailman/listinfo/opencms-dev<BR></FONT></BLOCKQUOTE></DIV></FONT></BODY></HTML>