Adding a Resource Environment Reference to a Web Application

Resource environment references are logical names applied to objects that EAServer administers and are accessed by Web applications, application clients, and Enterprise JavaBean (EJB) components.

To add a resource environment reference:

  1. Select web.xml in the WorkSpace Navigator of the Web Application Development perspective.

    The web.xml editor opens.

  2. Select the Resource tab of the editor.

    The Resource page appears.

  3. Expand Resource Environment References.

  4. Click Add.

    A new resource is added to the Resource Environment References list with the default name New ResourceEnvRefx.

  5. Change the default resource environment name in the Name field of the General Information section.

    This the partial JNDI name used in servlet and JSP code. Use the prefix jms/ for JMS references. For example, if your code refers to java:comp/env/jms/MyQueue, type jms/MyQueue in the Name field.

  6. Click the arrow in the Type field to open the drop-down list and select one of the following:

    Resource types

    TypeUse for:
    javax.jms.Queue JMS message queues
    java.jms.Topic JMS message topics
  7. To specify the link value, do one of the following:

    • If the resource type is javax.jms.queue, type the name of a configured queue connection factory.

    • If the resource type is javax.jms, type the name of a configured topic connection factory.

  8. (Optional) Type a description for the resource in the Description field.

Developing a Web Application

Configuring the web.xml File

Web.xml Editor

WorkSpace Navigator

Web Application Development Perspective

Sybase Developer Edition Servers

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com