Hi,

Now that I got my index page to work, I've modified it to display 
thumbnails of jpegs that happen to reside in that directory.  Is this the 
correct way of getting to the mime info of a node:

                org.apache.slide.taglib.bean.NodeBean servletNodeBean = 
ns.getNode("/files"+request.getServletPath(),true);
                org.apache.slide.taglib.bean.NodeBean currentDir = 
servletNodeBean.getParent();
                java.util.Vector children = currentDir.getChildren();

                for( int i=0; i<children.size(); i++ )
                {
                   org.apache.slide.taglib.bean.NodeBean node = 
(org.apache.slide.taglib.bean.NodeBean)children.elementAt(i);
                   String uri = 
request.getContextPath()+node.getUri().substring(6);
                   String mime = 
node.getLatestRevision().getProperty("getcontenttype",null).getValue();

                   if( !mime.equals("image/jpeg") )
                      continue;
                %>
                   <a href="<%=uri%>"><img src="<%=uri%>" width="100"></a>
                <%
                }


Thanks
Dmitry


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to