Show TOC Start of Content Area

Procedure documentation Creating a Reference in the web.xml File Locate the document in its SAP Library structure

Use

In this step you create a reference from the EJB project to the MailSession resource in the WEB-INF/web.xml

Procedure

...

       1.      Choose WebInf ® web.xml. Choose the Source tab and add the following code right before the </web-app> tag:

This graphic is explained in the accompanying text

<welcome-file-list>

      <welcome-file>index.html</welcome-file>

   </welcome-file-list>

   <resource-ref>

      <description>Reference to mail resource</description>

      <res-ref-name>mail/MailSession</res-ref-name>

      <res-type>javax.mail.Session</res-type>

      <res-auth>Container</res-auth>

   </resource-ref>

   <ejb-local-ref>

      <ejb-ref-name>SendMail</ejb-ref-name>

      <ejb-ref-type>Session</ejb-ref-type>

      <local-home>com.sap.engine.examples.ejb.javamail.SendMailLocalHome</local-home>

      <local>com.sap.engine.examples.ejb.javamail.SendMailLocal</local>

      <ejb-link>SendMail</ejb-link>

   </ejb-local-ref>

       2.      Save the file.

Result

The source for the ejb-jar.xml file is specified.

Next Step

Creating an Assembly Project

 

 

End of Content Area