Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Have the file in Tomcat like global.asa in IIS 1

Status
Not open for further replies.

ElaineMay

Programmer
Dec 9, 2002
11
0
0
CN
Just as subject, would you please tell me?
 
I don't thik so but what I did to overlap this problem is the following :
1) in Index.html file (in root directory), I typed this :
Code:
<body onload='document.location.href=&quot;../servlet/Routeur&quot;;'>

2) Then, in Web.xml :
Code:
<web-app>
   <servlet>
      <servlet-name>Routeur</servlet-name>
      <servlet-class>fr.ca.proto.rci.Routeur</servlet-class>
      <init-param>
         <param-name>CONFIGURATION_LDAP</param-name>
         <param-value>c:\\tomcat\\jakarta-tomcat-3.3.1\\webapps\\Trombinoscope\\WEB-INF\\config\\LDAPConfig.conf</param-value>
      </init-param>
      <init-param>
         <param-name>CONFIGURATION_PROTO_RCI</param-name>
         <param-value>c:\\tomcat\\jakarta-tomcat-3.3.1\\webapps\\Trombinoscope\\WEB-INF\\config\\ProtoRCIConfig.conf</param-value>
      </init-param>
   </servlet>
...
</web-app>

3) In Routeur.java :
Code:
  public void init(ServletConfig servletconfig)
    throws ServletException
  {
    super.init(servletconfig);
    try
    {
      String tmpStr = servletconfig.getInitParameter(&quot;CONFIGURATION_LDAP&quot;);
      LDAPConfig.setParamFile(tmpStr);
      LDAPConfig.loadParam();
      tmpStr = servletconfig.getInitParameter(&quot;CONFIGURATION_PROTO_RCI&quot;);
      ProtoRCIConfig.setParamFile(tmpStr);
      ProtoRCIConfig.LoadParam();
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CONSULTATION_ORGANISATION), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CONSULTATION_ORGANISATION_CAI), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_LISTE_FILIALES_CAI), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_LISTE_ORGANISATION_POPUP), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_LISTE_UNITE_POPUP), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CONSULTATION_PERSONNE), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CREATION_PERSONNE), new String(&quot;I_TRBCREAT&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_MODIFICATION_PERSONNE), new String(&quot;I_TRBMODIF&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_SUPPRESSION_PERSONNE), new String(&quot;I_TRBSUPPR&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CONSULTATION_UNITE), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_CREATION_UNITE), new String(&quot;I_TRBCREAT&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_MODIFICATION_UNITE), new String(&quot;I_TRBMODIF&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_SUPPRESSION_UNITE), new String(&quot;I_TRBSUPPR&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_PHOTO), new String(&quot;I_TRBPHOT&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_RECHERCHE_PERSONNE), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_RECHERCHE_PERSONNE_POPUP), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_RESULTAT_RECHERCHE_PERSONNE), new String(&quot;I_TRBVISU&quot;));
      pagesIU.put(new String(ProtoRCIConfig.SERVLET_TELECHARGER_RESULTAT), new String(&quot;I_TRBVISU&quot;));
      
    }
    catch(Exception exception)
    {
      exception.printStackTrace();
    }
  }

4) In config files (showing just one the other is the same type) :
Code:
##### Définition des classes d'objet LDAP #################################
###########################################################################

OC_ADRESSE=top,caorganisationaladdress
OC_EXTERNE=top,person,organizationalperson,inetorgperson,caextern
OC_GROUPE=top,groupofuniquenames,cagroup
OC_LOCALISATION=top,caorganisationaladdress,calocalisation
OC_ORGANISATION=top,organization,caorganisation
OC_PERSONNE=top,person,organizationalperson,inetorgperson,caperson
OC_SALLE=top,room,caconferenceroom
OC_SUCCURSALE=top,organizationalunit,caunit,cabranchoffice
OC_UNITE=top,organizationalunit,caunit

##### Définition des attributs requis #####################################
###########################################################################

ADRESSE_ATTRIBUTS_REQUIS=cn
EXTERNE_ATTRIBUTS_REQUIS=cn,sn
GROUPE_ATTRIBUTS_REQUIS=cn
ORGANISATION_ATTRIBUTS_REQUIS=o
PERSONNE_ATTRIBUTS_REQUIS=cn,sn
SALLE_ATTRIBUTS_REQUIS=cn
UNITE_ATTRIBUTS_REQUIS=ou

##### Définition des branches de l'arborescence du DIT ####################
###########################################################################

RACINE_SCHEMA=o=Credit Agricole
OU_ADRESSE=ou=Localisations
OU_EXTERNE=ou=Externs
OU_DIVERS=ou=Facilities
OU_GROUPE=ou=Groups
OU_PERSONNE=ou=People
OU_SALLE=ou=ConferenceRooms,ou=Facilities
OU_UNITE=ou=Units

##### Définition des paramètres de connexion au serveur LDAP ##############
###########################################################################

IP_SERVEUR_LDAP=127.0.0.1
PORT_SERVEUR_LDAP=390
LOGIN_SERVEUR_LDAP=cn=Directory Manager
PASSWORD_SERVEUR_LDAP=root0001
LDAP_SIZE_LIMIT=0
LDAP_TIME_LIMIT=0

I hope this'll help you.
Water is not bad as long as it stays out human body ;-)
 
If you can't give me a kiss, gimme a star LOL LOL LOL Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top