Hello folks, i�m trying to create a default attribute for all
sessions in my context, to do it i wrote this in my server.xml:

<Context ... >
        <Environment name="database-name"
                        type="java.lang.String"
                        value="Oracle"/>
</Context>

        My problem here is, how do i get this value from a servlet? I�m
trying to do this on init( ) method as follow:

 public void init( ServletConfig cfg_ )
    throws ServletException
 {
    doSomething( cfg_.getServletContext( ).getAttribute( "database-name" );
  }


        What did i wrong?

        Regards,
        Edson

Reply via email to