0 Replies Latest reply: Dec 26, 2012 12:15 AM by 981642 RSS

    How to apply style sheet (.css) in Weblogic directory listing

    981642
      Hi,

      We are migrating a directory listing application from Apache to Weblogic.
      Earlier we did this by Apache httpd.conf entry like below :

      <Directory "/opt/apache/httpd-2.1.9/htdocs/Myreportfolder">
      IndexOptions FancyIndexing FoldersFirst NameWidth=* XHTML
      IndexOrderDefault Descending Date
      IndexStyleSheet "/css/style.css"
      </Directory>

      /opt/apache/httpd-2.1.9/htdocs folder has all it's usual resource files.

      We were able to see documents in "Myreportfolder".

      Now we have moved to Weblogic and using virtual directory mapping as below and we are trying to achieve the same thing:

      <?xml version="1.0" encoding="UTF-8" ?>
      - <wls:weblogic-web-app xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
      - <wls:container-descriptor>
      <wls:index-directory-enabled>true</wls:index-directory-enabled>
      <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by>
      </wls:container-descriptor>
      - <wls:virtual-directory-mapping>
      <wls:local-path>/Myreportfolder</wls:local-path>
      <wls:url-pattern>/*</wls:url-pattern>
      </wls:virtual-directory-mapping>
      <wls:context-root>/getreports</wls:context-root>
      </wls:weblogic-web-app>

      We are able to view the reports but we do not get look-and-feel of Apache like directory listing.
      but we encounter below issues:
      1) File/Folder icons are not visible - we want to use style sheets in http header from the response that is returned from weblogic server
      2) Filename is limited to 29 characters when it is showing
      3) Files are not sortable as Descending order - we sorted using tag <wls:index-directory-sort-by>LAST_MODIFIED</wls:index-directory-sort-by> but the latest file is shown at the last

      We are thinking that Weblogic must be having some configuration like Apache httpd.conf where we can apply style sheets (css ).
      We would appreciate af anyone can provide better insight into the issue.
      or is it possible to extend weblogic.servlet.fileservlet class to serve this purpose.

      Thanks & regards,
      Rabi