[GE users] xml-qstat on Cocoon/Tomcat

olesen Mark.Olesen at faurecia.com
Mon Nov 22 12:28:58 GMT 2010


> Can you (or anyone else) offer me any pointers or examples as to how
> to call a CGI script with parameters (e.g. http://server/cgi-
> bin/qstat.cgi?cell=chbs&root=/data/sge62&job=12558) from the sitemap
> file please?

There's likely a better way, but for this sort of thing I've used an xinclude transformation to tap in from other sources.
Below is a snippet from the sitemap that shows this in action.

Of course, since your source maybe hard-coded, you won't need an xsl to generate the corresponding xi:xinclude element ... you can just have it directly defined. Squirreling it away in config/config.xml and extracting it via an xsl might be the easiest though. 

  <map:match pattern="qstatf~default.xml">
    <map:select type="resource-exists">
    <map:when test="cache/qstatf.xml">
      <map:generate src="cocoon:/cache/qstatf.xml"/>
    </map:when>
    <map:otherwise>
      <!--
         | fetch from "/<webapp>/qstatf.xml/~{sge_cell}/{sge_root}" via xinclude
         | (Note: the input xml is irrelevant)
         -->
      <map:generate  type="request" />
      <map:transform src="xsl/cocoon/redirect-query.xsl">
        <map:parameter name="clusterName" value="default" />
        <map:parameter name="resource"    value="qstatf.xml" />
        <map:parameter name="baseURL"
            value="http://{request:serverName}:{request:serverPort}/{request:sitemapURIPrefix}"
            />
      </map:transform>
      <map:transform type="xinclude"/>
    </map:otherwise>
    </map:select>
    <map:serialize/>
  </map:match>



/mark



DISCLAIMER:
This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=38&dsMessageId=297621

To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list