![]() |
|
Using URL Resources you can assign JNDI name aliases to Web pages accessed by an application. Rather than opening URLs directly, you can resolve them using JNDI.
You can configure a URL Resource using resource-config.xml by adding a url-resource tag under the url-resources tag. The resource-config.xml appears as below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resource-service PUBLIC '-//Pramati Technologies //DTD Pramati Resource Service//EN'
'http://www.pramati.com/dtd/pramati-resource-service.dtd'>
<resource-service>
<resources>
<default-resources> </default-resources>
<datasources> </datasources>
<connection-factories> </connection-factories>
<mail-resources> <mail-resources>
<url-resources>
<url-resource name="URL1" description="nodesc" url="http://www.pramati.com"/>
</url-resources>
<jms-adapters> </jms-adapters>
<resources>
</resource-service>
To add a URL Resource using the resource shell, on the resourceadmin:> prompt, enter: resourceadmin:> add_urlresource
Following are the are two ways to add a URL Resource using add_urlresource:
To use the interactive mode, enter add_urlresource, and press Enter. This asks for all the required fields one after the other. No special flag is required for this mode.
Enter the following values needed for the command resourceadmin:> add_urlresource
resourceadmin> - jndi name * #myURL resourceadmin> - url value * #www.pramati.com Creating URL Resource myURL URL Resource [myURL] started Created URL Resource myURL successfully Added URL resource [myURL]
Note: Fields followed by * are mandatory. Press Enter for the default values. Typing 'q' and pressing Enter at any point cancels the current command.
To use the non-interactive mode, enter add_urlresource. All the required attributes - the JNDI name and the URL value in this case - have to be specified. All optional attributes have default values that can be modified. There are three ways in which you can specify the fields:
add_urlresource jndiName= myURL urlValue=www.pramati.comadd_urlresource myURL www.pramati.comadd_urlresource -jndiName myURL -urlValue www.pramati.comTo configure a URL Resource using the Console, select Configure > Resources. This displays the Resources screen. If there are URL Resources added earlier, the URL Resources section displays the following details:
Table 1: URL Resource details
| Fields | Description |
|---|---|
| Name | The JNDI name of the URL Resource. This is a mandatory field and must be unique. |
| URL | This is a valid URL address, for example http://www.pramati.com. |
| Add | Use Add to add a new URL Resource. |
| Delete | Use Delete to delete a URL Resource. |
To add a URL Resource:
Table 2: Details for adding a URL Resource
| Fields | Description |
|---|---|
| Name | Enter here a unique name for the URL Resource. This is a mandatory field. |
| URL | Enter here a valid URL address, say www.pramati.com. This is a mandatory field. |
Select the URL Resource to be deleted using the check box on the Resources page and click Delete. This deletes the selected URL Resource.
Related Topics:
| © Pramati Technologies 2007 | Runs on Pramati Server | Feedback | Legal |