![]() |
Pramati Server 3.5 System Administration Guide |
URL Resources allow you to assign JNDI name aliases to web pages accessed by an application. Rather than opening URLs directly, you can resolve them using JNDI. URL resources can be created using the following ways:
In this chapter, we'll discuss how to create mail resources using the first two methods. To learn more about creating a URL resource using the management console, refer to the Administration Guide.
You can configure a URL Resource using resource-config.xml by adding a <url-resource> tag under the <url-resources> tag.
<url-resources> . . . . . <url-resource name="URL1" description="nodesc" url="http://www.pramati.com" /> . . . . . . </url-resources>
URL resources can be created at the command line prompt by logging in to the resource shell. If you are connected to the server using the remote shell, type ressh to login to the resource shell, or just type ressh at the default J2EE shell provided by the server. To add a URL resource, use the add_urlresource command:
resourceadmin@default> add_urlresource Please Enter the following values required by the command: Note: Fields followed by * are mandatory You can press 'Enter' for default values shown in [ ] Typing 'q' and pressing enter at any point will cancel the current command resourceadmin@default> - jndiName * #docstorePath resourceadmin@default> - urlValue * #http://corridor.pramati.com/docstore 3:10:44 PM- docstorePath [ OK ] Added URL resource [docstorePath]
There 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
Note: Fields followed by * are mandatory. You can press <enter> for default values shown in []. Typing 'q' and pressing <enter> at any point cancels the current command.
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]
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:
To remove a URL resource, login to the resource shell and type the remove_urlresource command as shown below:
Also, you can remove a URL resource by deleting the tag corresponding tag from the resource-config.xml.
Pramati Technologies © Copyright |
Pramati Server 3.5 System Administration Guide |