Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 865

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="12. Web Application Development" />
  <meta name="dc.subject" content="12. Web Application Development" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="webappdevelopment.html" title="Chapter Contents" />
  <link rel="prev" href="servphpext.html" title="Deploying PHP Applications" />
  <link rel="next" href="perlhosting.html" title="Perl Hosting" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>12. Web Application Development</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="rthjsp" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>12. Web Application Development</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="webappdevelopment.html">Chapter Contents</a> | <a class="link" href="servphpext.html" title="Deploying PHP Applications">Prev</a> | <a class="link" href="perlhosting.html" title="Perl Hosting">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="webappdevelopment.html">Web Application Development</a>
   </div>
    <br />
   <div>
      <a href="webserver.html">The HTTP Server</a>
   </div>
   <div>
      <a href="wsacl.html">Web Services ACL (Access Control List)</a>
   </div>
   <div>
      <a href="vsp1.html">Virtuoso Server Pages (VSP)</a>
   </div>
   <div>
      <a href="vspx.html">Virtuoso Server Pages for XML (VSPX)</a>
   </div>
   <div>
      <a href="rthwritaspxapps.html">Deploying ASP.Net Web Applications</a>
   </div>
   <div>
      <a href="asmxhosting.html">ASMX Web Service Hosting</a>
   </div>
   <div>
      <a href="blogger.html">Blogging &amp; Weblogs</a>
   </div>
   <div>
      <a href="servphpext.html">Deploying PHP Applications</a>
   </div>
   <div class="selected">
      <a href="rthjsp.html">Deploying JSP Applications</a>
    <div>
        <a href="#rthjspprelim" title="Environment Setup &amp; Verification">Environment Setup &amp; Verification</a>
    </div>
   </div>
   <div>
      <a href="perlhosting.html">Perl Hosting</a>
   </div>
   <div>
      <a href="pythonhosting.html">Python Hosting</a>
   </div>
   <div>
      <a href="rubyhosting.html">Ruby Hosting</a>
   </div>
    <br />
  </div>
  <div id="text">
    <a name="rthjsp" />
    <h2>12.9. Deploying JSP Applications</h2>

<p>The Virtuoso server with Java hosting support can be used to execute 
JSP pages, however, Virtuoso requires a JSP container engine first.  Jakarta 
provide such an engine that can be hosted inside Virtuoso with Java support.  
This section describes how JSP&#39;s can be executed using Jakarta Tomcat JSP 
implementation.</p>

<table class="figure" border="0" cellpadding="0" cellspacing="0">
    <tr>
     <td>
          <img alt="The HTTP JSP handler using Jakarta Tomcat" src="../images/http_handler_jsp.jpg" />
     </td>
    </tr>
    <tr>
        <td>Figure: 12.9.1. The HTTP JSP handler using Jakarta Tomcat</td>
    </tr>
    </table>

<a name="rthjspprelim" />
    <h3>12.9.2. Environment Setup &amp; Verification</h3>

<p>The following components are required:</p>

<ul>
      <li>Java SDK (or runtime only) needs to be installed.  Version 1.2 or later.</li>
      <li>Jakarta Tomcat package must be installed and configured.  This can 
 be obtained from the <a href="http://jakarta.apache.org/tomcat/">Jakarta project site</a> 
 (http://jakarta.apache.org/tomcat/)</li>
    </ul>

<p>The virtuoso.ini file must edited to including the following settings in the 
<span class="computeroutput">[Parameters]</span> section:</p>

<div>
      <pre class="programlisting">.....
JavaClasspath = &lt;jdk install dir&gt;/lib/tools.jar:&lt;tomcat install dir&gt;/bin/bootstrap.jar 
JavaVMOption1 = -Djava.endorsed.dirs=&lt;tomcat install dir&gt;/bin:&lt;tomcat install dir&gt;/common/endorsed
JavaVMOption2 = -Dcatalina.base=&lt;tomcat install dir&gt;
JavaVMOption3 = -Dcatalina.home=&lt;tomcat install dir&gt;
JavaVMOption4 = -Djava.io.tmpdir=&lt;tomcat install dir&gt;/temp
.....</pre>
    </div>

<div class="note">
      <div class="notetitle">Note:</div>
<p>The above has been tested for the jakarta-tomcat-4.1.18 distribution 
only.  Setting may vary for any other versions of Jakarta Tomcat, in which case we 
advise you consult the Tomcat documentation.</p>
    </div>

<p>Run the <span class="computeroutput">virtuoso-*-javavm*-t</span> binary, 
The Virtuoso server that includes Java hosting.</p>

<p>Start the Jakarta Tomcat server inside virtuoso server process using the 
following command from ISQL:</p>

<div>
      <pre class="programlisting">
SQL&gt; java_call_method (&#39;org.apache.catalina.startup.BootstrapService&#39;, null, &#39;main&#39;, &#39;V&#39;,
     vector (&#39;[Ljava/lang/String;&#39;, vector (&#39;start&#39;)));
</pre>
    </div>

<p>
In order to invoke the above command automatically at server startup you might 
put it in the autoexec.isql init script.
</p>

<p>Make a virtual directory for accessing JSP server, here is an example:</p>

<div>
      <pre class="programlisting">vhost_define (lpath=&gt;&#39;/tomcat&#39;,ppath=&gt;&#39;http://localhost:8080/&#39;);</pre>
    </div>

<p>Verify that your installations are correct by pointing your web browser 
of choice to <span class="computeroutput">http://localhost:8890/tomcat/</span> 
(assuming you are working on your local machine).  Run some of JSP examples 
provided with Tomcat distribution to verify that they are executed without errors.</p>
  
<div class="note">
      <div class="notetitle">Note:</div>
<p>For debugging purposes you may run the virtuoso-*-javavm*-t server with
foreground option to receive Java error messages, if any occur.</p>
    </div>

<div class="tip">
      <div class="tiptitle">See Also:</div>
  <p>
        <a href="inprocess.html">In-Process Data Access Client</a>
      </p>
    </div>

<br />

<table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="servphpext.html" title="Deploying PHP Applications">Previous</a>
          <br />Deploying PHP Applications</td>
     <td align="center" width="34%">
          <a href="webappdevelopment.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="perlhosting.html" title="Perl Hosting">Next</a>
          <br />Perl Hosting</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>