Stop directory listing using Sun web server6.1

I am using Sun web server6.1 on a Unix Box
when URL is given as http://abc.com/xyz/dirName
it dipslays all the files inside the directroy(dirName)......... i have confiured my obj.conf file as
NameTrans fn="ntrans-j2ee" name="j2ee"
NameTrans fn="document-root" root="$docroot"
PathCheck fn="unix-uri-clean"
PathCheck fn="check-acl" acl="default"
PathCheck fn="find-pathinfo"
PathCheck fn="find-index" index-names="index.html"
ObjectType fn="type-by-extension"
PathCheck fn=unix-uri-clean
I am using Unix Box.
is there anything that i am missing .
Someone plz help !!!!

See http://swforum.sun.com/jive/thread.jspa?threadID=23613&messageID=58178
for disabling directory listing with webserver 6.1.

Similar Messages

  • Directory lister for the web.

    Hi
    Here iam attaching my project code for my particualr aplication
    The source code for a directory lister for the web. You give it
    one or more URLs as arguments and its not displays the formatted results .. can any body will help me
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class WebList extends abcd.Application
    static final String progName = "WebList";
    public static void main( String[] args )
    (new WebList()).compat( args );
    public int newMain( String[] args )
    int argc = args.length;
    if ( argc == 0 )
    usage();
    return -1;
    for ( int argn = 0; argn < argc; argn++ )
    if ( argc > 1 )
    if ( argn > 0 )
    out.println( "" );
    out.println( args[argn] + ":" );
    list( args[argn] );
    return 0;
    private void usage()
    err.println( "usage: " + progName + " URL ..." );
    void list( String urlStr )
    String base = abcd.Utils.baseUrlStr( urlStr );
    Enumeration as;
    try
    as = new abcd.Spider( urlStr, err );
    catch ( MalformedURLException e )
    err.println( e );
    return;
    while ( as.hasMoreElements() )
    URLConnection uc = as.nextElement();
    if ( uc == null )
    continue;
    URL thisUrl = uc.getURL();
    String thisUrlStr = thisUrl.toExternalForm();
    if ( thisUrlStr.startsWith( base ) )
    thisUrlStr = thisUrlStr.substring( base.length() );
    if ( thisUrlStr.length() == 0 )
    thisUrlStr = ".";
    String mimeType = uc.getContentType();
    int len = uc.getContentLength();
    long mod = uc.getLastModified();
    Date modDate = new Date( mod );
    String modDateStr = abcd.Utils.lsDateStr( modDate );
    out.println(
    abcd.Fmt.fmt( mimeType, 14, abcd.Fmt.LJ ) + " " +
    abcd.Fmt.fmt( len, 8 ) + " " +
    modDateStr + " " + thisUrlStr );
    try
    InputStream in = uc.getInputStream();
    in.close();
    catch ( IOException e ) {}
    }

    Hi,
    It is enumerating the files reachable at or
    below those URLs, i hope it will full fill your application requirements.
    and also in the for loop you have to do pre increment not post increment so it may be the casue for entier your logic ..
    as per my knowledge iam changing the code .. i hope it will work for your application...
    still if you have any querys please post me with details of your projects so that i can help you more..
    here is modified code:
    =================
    import java.util.*;
    import java.net.*;
    import java.io.*;
    public class WebList extends abcd.Application
    static final String progName = "WebList";
    public static void main( String[] args )
    (new WebList()).compat( args );
    public int newMain( String[] args )
    int argc = args.length;
    if ( argc == 0 )
    usage();
    return -1;
    for ( int argn = 0; argn < argc; ++argn )
    if ( argc > 1 )
    if ( argn > 0 )
    out.println( "" );
    out.println( args[argn] + ":" );
    list( args[argn] );
    return 0;
    private void usage()
    err.println( "usage: " + progName + " URL ..." );
    void list( String urlStr )
    String base = abcd.Utils.baseUrlStr( urlStr );
    Enumeration as;
    try
    as = new abcd.Spider( urlStr, err );
    catch ( MalformedURLException e )
    err.println( e );
    return;
    while ( as.hasMoreElements() )
    URLConnection uc = (URLConnection) as.nextElement();
    if ( uc == null )
    continue;
    URL thisUrl = uc.getURL();
    String thisUrlStr = thisUrl.toExternalForm();
    if ( thisUrlStr.startsWith( base ) )
    thisUrlStr = thisUrlStr.substring( base.length() );
    if ( thisUrlStr.length() == 0 )
    thisUrlStr = ".";
    String mimeType = uc.getContentType();
    int len = uc.getContentLength();
    long mod = uc.getLastModified();
    Date modDate = new Date( mod );
    String modDateStr = abcd.Utils.lsDateStr( modDate );
    out.println(
    abcd.Fmt.fmt( mimeType, 14, abcd.Fmt.LJ ) + " " +
    abcd.Fmt.fmt( len, 8 ) + " " +
    modDateStr + " " + thisUrlStr );
    try
    InputStream in = uc.getInputStream();
    in.close();
    catch ( IOException e ) {}
    Regards,
    TirumalaRao.
    Developer Technical support,
    sun MicroSystem, India.

  • How to avoid directory listing in java web applications.

    how to avoid directory listing in java web applications.
    That is on typing the url of the application it should not the directory listing. Welcome tag in web.xml doesnot fully solve the problem, since still the images folder etc is still accessible

    I know of two ways.
    If you're using tomcat and have access to the conf directory.
    Edit your $TOMCAT/conf/web.xml. Find your default servlet properties and change
      <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>listings</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>to  <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>listings</param-name>
          <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>And restart your server. This will affect every directory on the server, and return a 405 directory browsing forbidden error.
    Another way, is to place an index.jsp inside each directory with a simple one line redirect to your applications CONTEXT_PATH.response.sendRedirect("http://yourserver/yourapp/");This will only affect specific directories which contain these index.jsp files.
    Hope this helps

  • Prevent directory listing, using struts

    hi all,
    i hav a web application which is built using struts. I am using tomcat as the servlet contatiner.
    The problem is, i want to prevent directory listings, i searched some forums, but didnt get the correct solution.
    plz help me...
    Regards
    Varma

    @ javamine, hi
    The snippet u hav posted is enough to stop directory listings!!
    1 <servlet>
    2 <servlet-name>default</servlet-name>
    3 <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet- 4 class>
    5 <init-param>
    6 <param-name>debug</param-name>
    7 <param-value>0</param-value>
    8 </init-param>
    9 <init-param>
    10 <param-name>listings</param-name>
    11 <param-value>false</param-value>
    12 </init-param>
    13 <load-on-startup>1</load-on-startup>
    14 </servlet>
    Notice tht at line no 11, the value is false, which indicates tht the directories are not to be listed in the portal.
    Actually at the time of installing tomcat, the value will be true.
    Regards,
    Varma

  • Directory Listing Using Weblogic Server

    Hi all,
    I need to be able to browse few directories via web page using Weblogic as WebServer ( on Linux RedHat 5.0)
    for example the directory to be browsed are:
    /home/oracle/swift
    /home/oracle/payables
    Please let me know how I can achieve this !!
    Thanks
    KS

    maybe it's a bit overkill to use the JCA File Adapter
    http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_file.htm#BABFGIEJ
    which has a "directory listing" feature
    but I think it's not very recommended to use directly the java.io.File class to perform this operation...
    any other thoughts?

  • How do I use Sun Web Server 7.0u1 reverse proxy to change public URLs?

    Some of our installations use the Sun Web Server 7.0 (update 1, usually)
    for hosting some of the public resource and reverse-proxying other parts
    of the URI namespace from other backend servers (content, application
    and other types of servers).
    So far every type of backend server served a unique part of the namespace
    and there was no collision of names, and the backend resources were
    published in a one-to-one manner. That is, a backend resource like, say,
    http://appserver:8080/content/page.html would be published in the internet
    as http://www.publicsite.com/content/page.html
    I was recently asked to research whether we can rename some parts of
    the public URI namespace, to publish some or all resources as, say,
    http://www.publicsite.com/data/page.html while using the same backend
    resources.
    Another quest, possibly related in solution, was to make a tidy url for the
    first page the user opens of the site. That is, in the current solution when
    a visitor types the url "www.publicsite.com" in his or her browser, our web
    server returns an HTTP-302 redirect to the actual first page URL, so the
    browser sends a second request (and changes the URL in its location bar).
    One customer said that it is not "tidy". They don't want the URL to change
    right upon first rendering the page. They want the root page to be rendered
    instantly i the first HTTP request.
    So far I found that I can't solve these problems. I believe these problems
    share a solution because it relies on ability to control the actual URI strings
    requested by Sun Web Server from backend servers.
    Some details follow, now:
    It seems that the reverse proxy (Service fn="service-passthrough") takes
    only the $uri value which was originally requested by the browser. I didn't
    yet manage to override this value while processing a request, not even if
    I "restart" a request. Turning the error log up to "finest" I see that even
    when making the "service-passthrough" operation, the Sun Web Server
    still remembers that the request was for "/test" (in my test case below);
    it does indeed ask the backend server for an URI "/test" and that fails.
    [04/Mar/2009:21:45:34] finest (25095) www.publicsite.com: for host xx.xx.xx.83
    trying to GET /content/MainPage.html while trying to GET /test, func_exec reports:
    fn="service-passthrough" rewrite-host="true" rewrite-location="true"
    servers="http://10.16.2.127:8080" Directive="Service" DaemonPool="2b1348"
    returned 0 (REQ_PROCEED)My obj.conf file currently has simple clauses like this:
    # this causes /content/* to be taken from another (backend) server
    NameTrans fn="assign-name" from="/content" name="content-test" nostat="/content"
    # this causes requests to site root to be HTTP-redirected to a certain page URI
    <If $uri =~ '^/$'>
        NameTrans fn="redirect"
            url="http://www.publicsite.com/content/MainPage.html"
    </If>
    <Object name="content-test">
    ### This maps http://public/content/* to http://10.16.2.127:8080/content/*
    ### Somehow the desired solution should instead map http://public/data/* to http://10.16.2.127:8080/content/*
        Service fn="service-passthrough" rewrite-host="true" rewrite-location="true" servers="http://10.16.2.127:8080"
        Service fn="set-variable" set-srvhdrs="host=www.publicsite.com:80"
    </Object>
    I have also tried "restart"ing the request like this:
        NameTrans fn="restart" uri="/data"or desperately trying to set the new request uri like this:
        Service fn="set-variable"  uri="/magnoliaPublic/Main.html"Thanks for any ideas (including a statement whether this can be done at all
    in some version of Sun Web Server 7.0 or its opensourced siblings) ;)
    //Jim

    Some of our installations use the Sun Web Server 7.0 (update 1, usually)please plan on installing the latest service pack - 7.0 Update 4. these updates addresses potentially critical bug fixes.
    I was recently asked to research whether we can rename some parts of
    the public URI namespace, to publish some or all resources as, say,
    http://www.publicsite.com/data/page.html while using the same backend
    resources.> now, if all the resources are under say /data, then how will you know which pages need to be sent to which back end resources. i guess, you probably meant to check for /data/page.html should go to <back-end>/content/page.html
    yes, you could do something like
    - edit your corresponding obj.conf (<hostname>-obj.conf or obj.conf depending on your configuration)
    <Object name=¨default¨>
    <If $uri = ¨/page/¨>
    #move this nametrans SAF (for map directive - which is for reverse proxy within <if> clause)
    NameTrans.. fn=map
    </If
    </Object>
    and you could do https-<hostname>/bin/reconfig (dynamic reconfiguration) to check out if this is what you wanted. also, you might want to move config/server.xml <log-level> to finest and do your configuration . this way, you would get enough information on what is going on within your server logs.
    finally,when you are satisfied, you might have to run the following command to make your manual change into admin config repository.
    <install-root>/bin/wadm pull-config user=admin config=<hostname> <hostname>
    <install-root>/bin/wadm deploy-config --user=admin <hostname>
    you might want to check out this for more info on how you could use <if> else condition to handle your requirement.
    http://docs.sun.com/app/docs/doc/820-6599/gdaer?a=view
    finally, you might want to refer to this doc - which explains on ws7 request processing overview. this should provide you with some pointers as to what these different directives mean
    http://docs.sun.com/app/docs/doc/820-6599/gbysz?a=view
    >
    One customer said that it is not "tidy". They don't want the URL to change
    right upon first rendering the page. They want the root page to be rendered
    instantly i the first HTTP request.
    please check out the rewrite / restart SAF. this should help you.
    http://docs.sun.com/app/docs/doc/820-6599/gdada?a=view
    pl. understand that - like with more web servers - ordering of directives is very important within obj.conf. so, you might want to make sure that you verify the obj.conf directive ordering is what you want it to do..
    It seems that the reverse proxy (Service fn="service-passthrough") takes
    only the $uri value which was originally requested by the browser. I didn't
    yet manage to override this value while processing a request, not even if
    I "restart" a request. Turning the error log up to "finest" I see that even
    when making the "service-passthrough" operation, the Sun Web Server
    still remembers that the request was for "/test" (in my test case below);
    it does indeed ask the backend server for an URI "/test" and that fails.
    now, you are in the totally wrong direction. web server 7 includes a highly integrated reverse proxy solution compared to 6.1. unlike 6.1, you don´t have to download a separate plugin . however, you will need to manually migrate your 6.1 based reverse proxy settings into 7.0. please check out this blog link on how to set up a reverse proxy
    http://blogs.sun.com/amit/entry/setting_up_a_reverse_proxy
    feel free to post to us if you need any futher help
    you are probably better off - starting fresh
    - install ws7u4
    - use gui or CLI to create a reverse proxy and map one on one - say content
    http://docs.sun.com/app/docs/doc/820-6601/create-reverse-proxy-1?a=view
    if you don´t plan on using ws7 integrated web container (ability to process jsp/servlet), then you could disable java support as well. this should reduce your server memory footprint
    <install-root>/bin/wadm disable-java user=admin config=<hostname>
    <install-root>/bin/wadm create-reverse-proxy user=admin uri-prefix=/content server=<http://your back end server/ config=<hostname> --vs=<hostname>
    <install-root>/bin/wadm deploy-config --user=admin <hostname>
    now, you can check out the regular express processing and <if> syntax from our docs and try it out within <https-<hostname>/config/<hostname>-obj.conf> file and restart the server. pl. note that once you disable java, ws7 admin server creates <vs>-obj.conf and you need to edit this file and not default obj.conf for your changes to be read by server.
    >
    I have also tried "restart"ing the request like this:
    NameTrans fn="restart" uri="/data"
    ordering is very important here... you need to do this some thing like
    <Object name=default>
    <If not $restarted>
    NameTrans fn=restart uri from=/¨ uri=/foo.
    </If>

  • Using Sun Web Server 6.1 from the IDE

    Using JSE 8 with Sun Web Server 6.1 set as the target container, I have a SUNWS61deployment.xml file created.
    That didn't exist in JSE 7. Is it WS 6.1 SP4 or SP5 -related ?
    I also have ws61-sun-web.xml with a simple <sun-web-app/> tag (empty deployment descriptor).
    What should this file contain? Is it a replacement for sun-web.xml?
    Do I still need sun-web.xml? Its DTD declaration sounds like Sun
    App Server 7 (http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd)
    So you have plans to make "Sun Resources" (pools, JNDI resources, ...) created in the IDE be registerable directly in the Web Server just like it's possible with the sun app server?
    How safe is it to use JSE 8 with an older Web Server Service Pack (say 6.1SP1)?

    SUNWS61deployment.xml is created bythe IDE to be used internally and not to be used by the developer. This file wouldn't be sent to webserver after deployment.
    The ws61-sun-web.xml is sun-web.xml only and yes it is same as it is in Appserver7 as the webcontainer for both Webserver6.1 and Appserver7 are same. After deployment to webserver, ws61-sun-web.xml is renamed to Webserver as sun-web.xml by the IDE. When opened the developer can edit in the XML editor.
    The reason for having it as ws61-sun-web.xml in IDE is to avoid the clash between sun-web.xml of Appserver8.1 which is J2EE1.4 based whereas Webserver6.1 Web container is J2EE1.3 based.
    It should be okay to use any service pack of Webserver6.1 with JSE8
    Hope this helps

  • Best way to use Sun Web Server connection pooling with Web Application?

    I have a number of applications that run Oracle and MySQL queries via Sun Web Server 6.1. I use the Web Server's built-in connection pooling, which works fairly well.
    As an interface with the connections I receive from the Web Server, I use a class, which (1) accepts the SQL and database name from a tool, (2) Opens the connection, runs the SQL, closes the connection, (3) puts the content of the result set into a Vector of Hashtables, (4) returns that Vector to the tool.
    Why do I use this Vector? That way, in my applications, I don't have to deal with opening connections (or getting them from the pool) and I don't have to worry about closing connections, because that's done automatically by the interface class.
    Is this a dumb approach to use? I'm a bit paranoid about open DB connections, because we have had a number of problems where connections would not be closed, go stale in oracle, and clog up the database resources.
    Can you suggest a better way to (1) smartly control opening and closing connections, and (2) enabling fast database access?
    Sorry, but given this Java/Sun Web Server double topic, I'm going to post the same message on the Web Server board.
    Any tips?
    dailysun
    P.S. For instance, in my tool, I call the interface class in this manner:
    Vector results_v = Database.getSelect("SELECT * FROM TEST","database1");
    getSelect uses the first string as the SQL and the second string as the jndi name of the Web server's database resource. getSelect does all the context stuff to get a connection from the pool, runs the SQL, puts the resultset into a Vector of Hastables (where each row is one Hashtable), and returns the Vector.

    I have a number of applications that run Oracle and MySQL queries via Sun Web Server 6.1. I use the Web Server's built-in connection pooling, which works fairly well.
    As an interface with the connections I receive from the Web Server, I use a class, which (1) accepts the SQL and database name from a tool, (2) Opens the connection, runs the SQL, closes the connection, (3) puts the content of the result set into a Vector of Hashtables, (4) returns that Vector to the tool.
    Why do I use this Vector? That way, in my applications, I don't have to deal with opening connections (or getting them from the pool) and I don't have to worry about closing connections, because that's done automatically by the interface class.
    Is this a dumb approach to use? I'm a bit paranoid about open DB connections, because we have had a number of problems where connections would not be closed, go stale in oracle, and clog up the database resources.
    Can you suggest a better way to (1) smartly control opening and closing connections, and (2) enabling fast database access?
    Sorry, but given this Java/Sun Web Server double topic, I'm going to post the same message on the Web Server board.
    Any tips?
    dailysun
    P.S. For instance, in my tool, I call the interface class in this manner:
    Vector results_v = Database.getSelect("SELECT * FROM TEST","database1");
    getSelect uses the first string as the SQL and the second string as the jndi name of the Web server's database resource. getSelect does all the context stuff to get a connection from the pool, runs the SQL, puts the resultset into a Vector of Hastables (where each row is one Hashtable), and returns the Vector.

  • Lion Server: How can I enable directory listing for the Web Server?

    The functionality was part of the Server App in Lion Server but was not included in Lion.  Can anyone shed some light on how to enable Directory Listing.  Any help is appreciated!

    Go to /etc/apache2 and edit the file 000_any_80_.conf
    using sudo nano command and replace  "-Indexes" with "+Indexes".
    Restart Apache with "sudo apachecrl restart"
    Good luck,
    Ricky
    from Costa Rica

  • Cannot "enable directory listing" from the wadm CLI

    With SJSWS 6.1 sp1 up to sp11, there was a documented bug that caused directory listing to work even though the ACL was:
    acl "default";
    authenticate (user, group) {
      prompt = "Sun ONE Web Server";
    allow (read, execute, info) user = "anyone";
    allow (list, write, delete) user = "all";With SJSWS 7.0, this bug was fixed. The default installed ACL is exactly the same from 6.1 to 7.0. e.g. the "list" right is given only to [all] authenticated user, and not everyone. So requesting a "GET /images/" will give you a 401 unauthorized, as should have happened in 6.1, which causes your browser to prompt you to login.
    By default, 7.0 webserver configs are created with directory listing enabled with "index-common". But it can also be disabled, directing the user to a defined static file on the web server disk. i.e.:
    Service method="(GET|HEAD)" type="magnus-internal/directory" fn="send-error" path="/path/on/disk/notFound.html"In either case, out of the box, neither enabling nor disabling directory listing matters because the default ACL denies directory listing in the prior case, and denies the "notFound.html" response in the later. Note "allow (list) user = all" requires authentication for the "list"privilege.
    To fix this, you change the ACL so the "list" privilege is in the first ACI, i.e., 'allow (read, execute, info, list) user = "anyone";'
    The problem is that even though the ACL file can be modified in the Admin Web GUI, it cannot be modified from the the wadm CLI.
    So, because of this, technically one cannot truly enable directory listing (wadm enable-directory-listing) using wadm. The best you can do is manually edit the existing ACL, or create a new ACL file and set that new file using wadm.
    I don't even see a way, using wadm, to dump new content into the ACL file. Without the GUI, you are stuck. And you cannot perform remote administration for this feature using wadm.
    If we admins are creating TCL scripts to automate creating and configuring webserver configs, this feature cannot be configured.
    I would like to know if I am wrong, and how I could resolve this using the wadm CLI alone.
    And if the default is going to remain that the "list" privilege requires authentication, this should be documented in the SJSWS7 documentation for enabling and disabling directory listing.

    pull-config does not work in this case because of two reasons:
    1. you must still manually edit the ACL file (can already do that on the admin server)
    2. and you must make that change on a node which has the configuration
    In my case, I want to remotely manage the configuration using wadm. But I do not want to log into one of the nodes in the server farm.
    And I want to avoid having to edit the ACL file manually if possible, or through the GUI which requires manual intelligent point-and-click efforts.
    Seems like my only bet is to:
    1. create the config via the wadm tcl shell
    2. then outside of the wadm command, execute some script that can perform a scp to the admin server, or a ssh for a local copy of a previously written ACL file - which requires a lot of extra setup to make that happen.
    3. then get back into wadm to execute the other tasks
    I want to avoid step #2.

  • How do I populate an array with a directory listing.

    I have a web site that has its photos updated by another person using a content management system that I have written. As Dreamweaver does not know about these extra photos, if I try to
    syncronise the site on my machine for backup purposes, Dreamweaver downloads all 5000+ photos, and this can take upwards of 12 hours if there are no breaks in the connection.
    So I am trying to write a page that creates an array of the existing files on the remote site. It will then do the same on my local site, and by comparing the arrays, will make a list of the new files, and then download these, which will save a lot of time and bandwith charges.
    First I have to read the directory list, using the code below which reads and echos it on screen.
    However, I cannot work out how to populate the required array.
    <?php
        try
        {          /***photo directory ***/
            $it = new directoryIterator('../web/thumbs');
            while( $it->valid())
                  /*** echo if not a dot directory ***/
                if( !$it->isDot() )
    /**** Array creation code needs to go here I think.***/
    echo $it->current()."<br />";
         /*** move to the next element ***/
                      $it->next();
        catch(Exception $e)
            /*** echo the error message ***/
            echo $e->getMessage();
    ?>
    This creates a list of files and displays it on the page.
    How do I store it in an array?
    Howard Walker

    Although not the solution you were looking for, consider the following:
    Click the icon in DW for "Expand to show local and remote sites."  Arrange the remote image directory by "Modified date," Then select all the recent images and GET them.
    I find the above method good enough for occassional synchronization. I also simply ignore broken image links on the testing system.
    If the above is not a solid enough solution, perhaps someone else will write your array function for you. I don't have the time.

  • Disabling virtual directory listing

    I'm using the webserver underneath the portal server to host some web pages. I found out that I can list the files in whatever directory in public_html. This is also in the standard portal install where you can ask to see http://portalserver/images.
    I modified the webserver ACL's to deny all for anyone/anyplace and then allow read for everyone but still I can list the files. I know a solution is setting an index.html in every dir/subdir, but this is not an elegant solution.
    Any other options?

    You can disable directory listing in the Web Server admin console under Content Mgmt -> Document Preferences. Set Directory Indexing to None.

  • Request the information about Sun Web server

    Hi,
    We are developing an embedded system. We need install a web server in our system. We got some information about Sun web server, but it is not enough for us to decide which web server we should use. Would you please give me some detail information of Sun web server?
    1.Firstly, we will use the web server in an embedded system. Can Sun web server run in the embedded system, such as VxWroks, Embed Linux?
    2.Secondly, we will use chroot jail to enhance the security. Can Sun web server support chroot jail?
    3.We can pay money for the service. But would you provide the service to customize the web server according to our necessary and maintain the web server? What's the price?
    4.Can you give me a detail features list of Sun web server? Or please check the following feature list. Thank you very much.
    Feature List:(For native support feature, input (Y)es; Support via third-party product, input (3)rd; Not support, input (N)o).
    Part I. Core Technology
    ()HTTP/1.1 &#12288;
    ()KeepAlives&#12288;
    ()Pipelining&#12288;
    ()Templated web site
    ()reconfiguration without restart
    ()On-demand web site deployment
    ()High scalability process model
    ()Linear SMP scalability
    ()Configurable log format
    ()Customisable error pages
    ()Dynamic log rotation
    ()Bandwidth throttling
    ()Basic Server-Parsed HTML (SSI)
    ()Dynamically-generated SSI
    ()Automated self-diagnostics
    ()Multiple logs&#12288;
    ()Virtual servers
    ()embedded in other applications
    ()extensible
    ()modularity
    ()J2EE 1.4 support
    ()IPv6 support&#12288;
    Part II. Security
    ()SSL v2 and v3
    ()SSL(hardware)
    ()SSL certificate management
    ()Clustered SSL certificate deployment
    ()Antivirus
    ()ActiveDirectory authentication
    ()Antispam
    ()Built-in firewall
    ()LDAP authentication
    ()Anti-Denial-of-Service protection
    ()HTTP request filtering
    ()Malformed HTTP header protection
    ()Integrated attack monitoring and logging
    ()Hardware crypto support
    ()IP address authentication
    ()DNS name authentication
    ()User-based authentication
    ()Referrer-based authentication
    ()Basic Authentication
    ()Other/system authentication
    &#12288;
    Part III. Management
    ()GUI Setup
    ()GUI configurate
    ()Web-based user interface
    ()remote management
    ()WebDAV support
    ()Clustered web site management
    ()Group-based web site configuration
    ()Integrated licence management
    ()Configuration wizards
    ()Scriptable (command-line) configuration tools
    ()Real-time web-based statistics
    ()SNMP monitoring
    ()Delegated user management (htaccess)
    ()Scalable subserver support
    &#12288;
    Part IV. Application Support
    ()NSAPI
    ()ISAPI filters
    ()ISAPI extensions
    ()FastCGI
    ()CGI
    ()Generic FastCGI/CGI handler
    ()Secure CGI sandboxing
    ()Limit CGIs by CPU or memory use
    ()LDAP
    ()XML support
    ()SOAP
    ()Request rewriting
    ()Own API
    ()Own scripting/batch language
    ()WAR file support
    ()Content filters
    ()HTTP (Gzip) Compression
    ()Perl
    ()Servlet
    ()JSP
    ()ASP/ESP
    ()Secure setuid PHP
    ()PHP
    Part V. Support
    ()commercial support
    ()MailList
    ()Forum
    ()Free telephone
    ()24x7 support
    ()GSA scheduled
    ()FAQ
    ()Tutorial
    ()Document
    ()Source code
    Thank you very much!

    Web Server is not currently supported under VxWorks or Embedded Linux. There's information on the supported platforms on the Web Server page at http://www.sun.com/webserver

  • Replace Quotes, Connection Pooling, and Sun Web Server with MySQL, Oracle

    This is code I use to insert data into my MySQL and Oracle databases.
    I takes care of quotes and shows use of context, i.e. when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to reply if you have questions on how to set up connection pooling using Sun Web Server 6.1SP - it took quite a long time to learn and I couldn't find much information throughout the web, so I hope this helps...
    This is not a question and I am not looking for an answer, but please post comments or suggestions.
    dailysun
    This is in one class where I have a hashtable containing the
    column name / value pairs that I want to enter into my table.
    This class simply creates the SQL string from the values in the
    hashtable. It then passes that hashtable including the database
    name to a class which executes that sql statement (second code
    portion).
    /* Insert data into sf_parts. Create the column strings from
             * the provided hash table. Be sure to parse out hash elements which
             * are used for the createTemplate process
            StringBuffer values = new StringBuffer();
            StringBuffer fields = new StringBuffer();
            Enumeration keys = fieldHash.keys();
            while(keys.hasMoreElements()){
                Object currentKey = keys.nextElement();
                    String fieldValue = (String) fieldHash.get(currentKey);
                    if(values.length() >0){
                        values.append(",");
                    values.append("'"+fieldValue.replaceAll("'","''")+"'"); // Takes care of quotes and various other special characters!
                    if(fields.length() >0){
                        fields.append(",");
                    fields.append(currentKey);
            sql = "INSERT INTO myTable (" + fields.toString() + ") VALUES (" + values.toString() + ");";
            String insertResult = caq.getInsertDelete(sql,"myDatabaseName"); // your database name is defined in web.xml and sun-web.xml when you use Sun Web Server's Connection Pooling.
            returnValue += "<br><br><b>Rows inserted into table(myTable): </b>" + insertResult + "<br>\n";
            And, like I describe above, this method executes the sql statement.
         * Takes care of insert, update and delete requests.
         * Must have set both dbName as well as the sql String.
         * Will return number of rows affected as String.
         * @return String Number of rows affected
         * @exception SQLException
         * @exception Exception
        public String getInsertDelete() {
            checkData(); // this simply checks if the variables dbName and sql are not empty ;-)
            InitialContext initContext = null;
            int rv = 0;
            try{
                // Get connection from configured pool
                initContext = new InitialContext();
                source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName); // I have this set up in web.xml and sun-web.xml (I use Sun Web Server 6.1SP which does connection pooling for me)
                conn = source.getConnection();
                if(conn != null){
                    stmt = conn.createStatement();
                    rv = stmt.executeUpdate(sql);
            }catch (SQLException e){
                // do something
            }catch (Exception e){
                // do something
            }finally{
                try{
                    stmt.close();
                }catch(Exception e){
                    // do something
                try{
                    conn.close();
                }catch(Exception e){
                    // do something
                try{
                    initContext.close();
                }catch(Exception e){
                    // do something
            return rv+"";
        }  

    This is code I use to insert data into my MySQL and
    Oracle databases.
    I takes care of quotes and shows use of context, i.e.
    when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to
    reply if you have questions on how to set up
    connection pooling using Sun Web Server 6.1SP - it
    took quite a long time to learn and I couldn't find
    much information throughout the web, so I hope this
    helps...
    This is not a question and I am not looking for an
    answer, but please post comments or suggestions.Using prepared statements would mean that you wouldn't have to worry about quotes.
    You should be closing the result set.
    You are handling all fields as strings. That won't work with time fields and might not work for numeric fields.
    Presumably most of your variables are member variables. They should be local variables because that is the scope of the usage.
    You must do something with the exceptions.
    Hashtables although convienent mean that problems with usage can only be resolved at run time rather than compile time.

  • Annoucing a few complimentary copies of Sun Web Server: Essentials Guide

    Dear Sun Web Server user,
    As you may have heard, found it on amazon.com or stumbled on it in the local book store like Borders or Barnes & Noble, there is a new book on Sun Web Server technology. If you haven't, no worries. Please refer to [t-5406033] or visit the [Essential Guide's web site|http://www.sunwebserver.com/].
    We are now pleased to announce availability of a few complimentary copies of the Essential Guide. We'll be raffling away the copies in the next few months. If you are interested in a free copy of the book, please read further to enter the raffle.
    It's easy to enter the raffle and get started:
    Step 1: If you haven't already done so, download, install and register.
    Step 2: Write a review of Sun Web Server product on Web Server's official page [1], and
    Step 3: Send us an email webserver at sun dot com, confirming your Step 1 along with a link to your review (Step 2).
    What happens next?
    We'll raffle at least a copy once in a month and the winner(s) will be notified. With may share the raffle results on with a permission from the lucky winners. If you are interested, get started today!
    [1] [Sun Web Server's official page|http://www.sun.com/webserver/].
    Disclaimer: Please note that the raffle is organized by the author(s), and that Sun Microsystems or Pearson Media - the publishers of The Essential Guide - are not responsible for the raffle.

    Hi mv,
    I probably mis-spoke. It is not so much the features that are missing in Sun Web Server, as it is the availability of additional user plugins. However, that being said, I chose Sun Web Server over Apache because of security and performance. I realize additional plugins could adversely affect both of those. I have emailed Sun marketing about a specific feature for Web Dav I would like to see. This would make things much easier for people who would like to do mass hosting virtual hosting. Most of the real valuable features that gave Apache an edge, the web server team has added in version 7. I have pasted a portion of the letter I emailed to Sun marketing below about Web Dav, and my logic behind it. This as well as being able to hook the user system into standard open source databases makes for a broader solution appeal. I realize I only have one view of the market, and these are just my two cents. :-) Thanks!
    TonyZ
    **** Letter ******
    I was introduced to Sun Web Server several years ago when we began looking at moving servers away from Microsoft technology and also bringing them into our facility. As a network and sys admin, I evaluated using different web servers out there as we had a few years to work on this project to ensure uptime and reliability. Initially, I found Sun Web Server quite confusing and looked at Apache. However, after the web interface was retooled, I found Sun Web Server quite simple and refreshing to use. Since we have to be CISP compliant for the credit card industry, security was very important to us. Not only from a code standpoint, but also from an accidental misconfiguration standpoint. In my opinion, Sun Web Server out shines Apache and other alternatives by a long shot.
    As far as the WebDav feature, what I have been looking at is how to expand and offer hosting and web services. I currently work for a small company which retails products on the web, and I also contribute to a few open source projects. Currently, I am working with http://www.mynajs.org/. We have been discussing how we could offer hosting for people wanting to try out the project. Hosting companies using Linux typically have deep hooks into the Linux operating system for managing users. For hosting, you have a whole specialized Linux stack with specialized disk quotas, users, ftp server with users based on Linux users, and mail. From my standpoint, while this works, it can become a nightmare as far as updates, system administration, patching, etc. For a business ROI, and technology footprint, this doesn't make sense. There are control panels out there that take care of some of this, but now you have another whole layer of technology to troubleshoot. If I do not want to use the Linux/Apache stack, and if I am using Java, and do not want to add Tomcat as well, what do I use? With Sun Web Server, I get the best of both worlds, one install, one piece of software, operating system separation, blazingly fast speed, out of the box clustering, one interface for management, standard serving as well as Java, and WebDav so that now I can eliminate an ftp server and reduce my footprint for security and maintenance headaches. One neat package. However, now I still have to manage and restrict users. How to do this using Sun Web Server? Right now, I have to either run an ftp server with quotas built in, or go back to the Linux operating system and work with specialized scripts an maintenance. In theory, if Sun Web Server had quotas, I have my user system with the controls I need. At the very least, if there were hooks to the WebDav system to perform custom processing on certain events, it would leave the door open for greater control of the user and system. Now if we want to offer a hosting solution, whether it be online storage, web hosting, or Java hosting, or social site, all we need is one product, Sun Web Server! With all of its features for enhancing performance, security, and much more. I might also add, that for a small companies, Sun Web Server has been a pretty much set it and forget it solution. It has been my experience for our servers to run pretty much without intervention once they are setup. With the watch dog process, if there is a problem, it is rarely noticed except for the admin watching the logs. Technically, I am not sure why anyone would choose something different than Sun Web Server. Apache is the hosting standard, but it is really Apache plus Linux. With a few more user features, I think Sun Web Server could replace the whole Apache/Linux stack, the Apache/Linux/Tomcat stack, outshine those solutions on heavy loads and high end features, and offer better ROI.

Maybe you are looking for