Extracting the JMC custom tag library

The JMC tag library is part of the JMC application, stored as jmc-app.ear in the admin JRun server's root directory. JRun automatically deploys this application when you start the admin server.

In order to use the tag library, you must put a copy of it in your web application's lib directory. You must not reference a tag library that is in one web application from another web application because this creates breakable dependencies.

The JMC custom tag library is stored as jmcmgmt.jar in the jmc-app.war file's WEB-INF/lib directory. The jmc-app.war file is stored in the jmc-app.ear file.

The following tree shows the structure that leads to the jmcmgmt.jar file:

�jmc-app.ear
�|-�jmc-app.war
�|���|-�WEB-INF/
�|���|���|-�lib/
�|���|���|���|-�jmcmgmt.jar
...�...�...�...

If the admin JRun server is running, you can copy the JMC custom tag library from jrun_root/servers/admin/SERVER-INF/temp/jmc-app.war-ID/WEB-INF/lib. JRun stores the tag library here during automatic deployment of the EAR file.

To extract the JMC custom tag library:

  1. Extract the jmc-app.war file from the jmc-app.ear file using the following JAR utility:
    %>jar -xf jmc-app.ear jmc-app.war
    

    You can also extract the jmcmgmt.jar file using an extraction utility such as WinZip.

  2. Extract the jmcmgmt.jar file from the jmc-app.war file using the following JAR utility:
    %>jar -xf jmc-app.war WEB-INF\lib\jmcmgmt.jar
    
  3. Move the jmcmgmt.jar file to your web application's WEB-INF/lib directory.

    For example, to use the JMC tags in the default application on the default JRun server, move the extracted jmcmgmt.jar file to jrun_root/servers/default/default-ear/default-war/WEB-INF/lib. You must create a lib directory for the default application. It does not contain one by default.

  4. Restart the JRun server. The classloader recognizes the new file in the WEB-INF/lib directory. You do not have to change the classpath settings for the server's JVM.
  5. At the top of each JSP page that invokes the custom tags, add a taglib directive and point the uri attribute to the JAR file, as the following example shows:
    <%@ taglib prefix="jmcmgmt" uri="WEB-INF/lib/jmcmgmt.jar" %>
    

    The taglib directive identifies the prefix that you use in conjunction with a tag name to invoke tags in that library.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/jrun/4/JRun_SDK_Guide/custJMC2.htm