husted 01/02/19 11:52:52 Modified: src/doc installation.xml Added: src/doc installation-wls5.xml installation-jr30.xml installation-oas.xml installation-sas371.xml installation-tc31.xml installation-ubs72.xml installation-was352.xml Log: (Submitted by Ted Husted). Move container installs to seperate pages. Revision Changes Path 1.14 +8 -455 jakarta-struts/src/doc/installation.xml Index: installation.xml =================================================================== RCS file: /home/cvs/jakarta-struts/src/doc/installation.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- installation.xml 2001/02/13 17:10:34 1.13 +++ installation.xml 2001/02/19 19:52:51 1.14 @@ -5,10 +5,6 @@ <author>Craig R. McClanahan</author> <author>Martin Cooper</author> <author>Ted Husted</author> - <author>Robert Hayden</author> - <author>Wong Kok Kai</author> - <author>John Rousseau</author> - <author>Eric Wu</author> <title>The Struts Framework Project - Installation</title> </properties> @@ -231,7 +227,7 @@ <li>In some cases, you may need to restart your container if it is running.</li> </ul> -<h3>Status of various containers -- as reported by volunteers on the Struts-User list:</h3> +<h3>Status of various containers</h3> <ul> <li>Tomcat 3.1+ "standalone" - No additonal steps required.</li> @@ -240,459 +236,16 @@ </ul> <ul> - <li>Bluestone Universal Business Server - <a href="#bluestone">Additional steps - provided below.</a></li> - <li>JRUN - <a href="#jrun">Additional steps provided below.</a></li> - <li>Orion Application Server - <a href="#orion">Additional steps provided below.</a></li> - <li>Silverstream - - <a href="#silverstream">Additional steps provided below.</a></li> - <li>Tomcat 3.1+ with Apache - <a href="#tomcat_apache">Additional steps provided - below.</a></li> - <li>Weblogic 5.1 (sp8) - <a href="#wls6">Additional steps provided below.</a></li> + <li>Bluestone Universal Business Server - <a href="installation-ubs72.html">Additional steps required.</a></li> + <li>JRUN - <a href="installation-jr30.html">Additional steps required.</a></li> + <li>Orion Application Server - <a href="installation-oas.html">Additional steps required.</a></li> + <li>Silverstream - - <a href="installation-sas371.html">Additional steps required.</a></li> + <li>Tomcat 3.1+ with Apache - <a href="installation-tc31.html">Additional steps required.</a></li> + <li>Weblogic 5.1 (sp8) - <a href="installation-wls5.html">Additional steps required.</a></li> + <li>WebSphere - <a href="installation-was352.html">Additional steps required.</a></li> </ul> -<ul> - <li>Websphere - Determination pending.</li> -</ul> - -<h4><a name="bluestone">Bluestone Universal Business Server</a></h4> - -<ul> - <li>You need UBS version 7.2 to run war file applications. The UBS 7.2.2 evaluation - is located <a href="http://www.bluestone.com/SaISAPI.dll/SaServletEngine.class/products/downloads.jsp">here</a>. - If you're using version 7.2.1, you need to download the WAR file patch, located - in the product enhancement section of Bluestone's website <a href="http://www.bluestone.com/SaISAPI.dll/SaServletEngine.class/products/wfe.jsp">here</a> - </li> - <li> After installation of the correct version and/or patch of UBS 7.2, you - need to modify your apserver.txt file to point to the correct directory for - your war file applications. Look for the section that says something similar - to the following:<br /> - <pre> - [SaServletEngine.class] - session_affinity=1 - type=1 - program=/SaServletEngine.class - file_path=f:\webapps - host=localhost:20000 -</pre> - </li> - - <li>Use the directory specified by the "file_path" variable, or modify it to - point to your own custom webapp directory. Copy the "struts-documention.war" - and "struts-example.war" files into that webapp directory, and start the UBS - (read documentation distributed with UBS for information on how to start it - if necessary). Your webapps are now accessible from the following URL: - <p align="center"> http://localhost/<PLUGIN>/SaServletEngine.class/struts-example/<br /> - http://localhost/<PLUGIN>/SaServletEngine.class/struts-documentation/ - </p> - </li> - - <li> Note: "<PLUGIN>" represents the plugin you are using for your specific - webserver. For apache on Windows, it might be "cgi-bin/SaCGI.exe", for IIS - on Windows, it might be "scripts/SaCGI.exe" or "scripts/ISAPI.dll". Consult - the UBS documentation for more information. </li> -</ul> - -<h4><a name="jrun">JRUN 3.0 SP2A, VERSION 3.02A.11614</a></h4> - -<b>Tested with: Microsoft IIS 5.0, Windows 2000</b> - - -<h5>Important Note:</h5> - -<p>At the moment, JRun is not fully compliant with the JSP 1.1/1.2 -specification. </p> - -<p>Specifically, the automatic type conversions for custom tag parameters -specified in "Issue 7" of the JSP 1.1 Errata and in the JSP 1.2 Proposed -Final Draft have not yet been implemented.</p> - -<p>As it stands, JSP pages that make use of Struts taglibs whose parameters -require conversion (such as booleans) will not compile under JRun. This -includes the Struts Example Application. Attempting to run the example -application will result in an exception similar to the following being -thrown:</p> - -<pre> -/struts-example/index.jsp: - -javax.servlet.ServletException: Compilation error occured: - -allaire.jrun.scripting.DefaultCFE: - -Errors reported by compiler: -c:/JRun/servers/default/Struts - Example/WEB-INF/jsp/jrun__index2ejspa.java:41:1:41:27: - -Error: No match was found for method "setLocale(java.lang.String)". -</pre> - -<p>(For more details see refer to:<br/> -<font size="-1"><a href="http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html">http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html</a></font>)</p> - -<p>The following instructions describe how to install the Struts Example -Application under JRun. A subsequent section describes how the Struts Example -Application can be patched to work with Struts</p> - -<p>The following instructions assume the following:</p> - -<ul> -<li>JRun has been installed and integrated with the web server of choice.</li> - -<li>$APP_SERVER_NAME is the name of the application server used to host the - application. (When JRun is first installed, it creates an application - server called JRun Default Server).</li> - -<li>$APP_SERVER_DIR is the directory used to hold applications hosted by - $APP_SERVER_NAME. For the JRun Default Server, the directory is - $JRUN_HOME/servers/default where $JRUN_HOME is the directory where - JRun is installed.</li> -</ul> - -<h5>Installing the struts example application</h5> - -<ul> -<li>Login to the JRun Management Console.</li> - -<li>On the left pane, select $APP_SERVER_NAME. A page showing the - current server status will be shown on the right pane.</li> - -<li>On the right pane, click on the WAR Deployment link. A page - containing a list of the currently deployed web applications will be - shown.</li> - -<li>On the right pane, click on Deploy an Application. Complete the Web - Application Information form as follows:</li> - - <ul> - <li>Servlet War File or Directory: Enter the full path where - struts-example.war is found or click on Browse to select - the path.</li> - <li>JRun Server Name: $APP_SERVER_NAME</li> - <li>Application Name: Struts Example</li> - <li>Application Hosts: All Hosts</li> - <li>Application URL: /struts-example</li> - <li>Application Deploy Directory: will default to - $APP_SERVER_NAME/Struts Example (or the name as specified for - Application Name).</li> - </ul> - -<li>Once the form is complete, click on the Deploy button.</li> - -<li>If deployment is successful, restart the application server by - clicking on <code>$APP_SERVER_NAME</code> on the left pane. A page showing the - current server status will be shown on the right pane. Click the - Restart Server button to restart the application server.</li> - -<li>Test the sample application by using the following URL in the - browser:<br/> - <code>http://hostname/struts-example/index.jsp</code><br/> - The struts-documentation.war can be installed using the same - procedure.</li> -</ul> - -<h5>Installing unpacked web applications</h5> - -<p>The above steps should be followed for applications deployed as <code>*.war</code> files.</p> - -<p>For unpacked web applications, configuration involves the following steps:</p> - -<ul> -<li>From the JRun Management Console, select <code>$APP_SERVER_NAME</code> (on the - left pane) and click on WAR Deployment (on the right pane).</li> - -<li>On the right pane, click on Create an Application and complete the - Web Application Information form as follows:</li> - -<li>JRun Server Name: $APP_SERVER_NAME</li> - - <ul> - <li>Application Name: myApplication</li> - <li>Application Hosts: All Hosts</li> - <li>Application URL: /myApplication</li> - <li>Application Deploy Directory: will default to<br/> - <code>$APP_SERVER_NAME/myApplication</code></li> - </ul> - -<li>Click on Create to submit the form.</li> - -<li>Once the web application is created, install and configure the struts - components (struts.jar, struts*.tld, etc) for the web application under - <code>$APP_SERVER_NAME/myApplication/WEB-INF</code></li> - -<li>Install the remaining components of the application: .class files, - JSP pages,.properties files etc as required.</li> - -<li>To configure the extension mapping of the request URI (ie *.do) to - the action servlet, expand <code>$APP_SERVER_NAME</code> on the left pane, expand - the Web Applications branch and click on myApplication. The right pane - will display the configuration options for myApplication. Click on - Servlet URL Mappings. A list of existing mappings will be shown. Click - the Edit button and create the following entry:</li> - - <ul> - <li>Virtual Path/Extension: *.do</li> - <li>Servlet Invoked: action</li> - </ul> -<li>Click on the Update button to save the changes.</li> -<li>Restart the application server.</li> -<li>The application should now be accessible from the browser.</li> -</ul> - -<p>The JRun application server will need to be restarted each time one of the -following changes are made to the web application:</p> - -<ul> -<li><code>.class</code> or <code>.jar</code> files are modified</li> -<li><code>.properties</code> files are modified</li> -<li><code>.xml</code> files are modified</li> -</ul> - -<h5>Patching the struts example application</h5> - -<p>As mentioned at the beginning of these notes, the Struts Example Application -will not run under JRun without modification. The following changes will need -to be made:</p> - -<ul> -<li>index.jsp, logon.jsp: Change <html:html locale="true"> to <br/><html:html locale=<%= true %>></li> -<li>registration.jsp, subscription.jsp: Change all instances of filter="true" to <br/>filter=<%= true %></li> -</ul> - -<h4><a name="orion">Orion Application Server</a></h4> - -<p>In the steps below, <code>$ORION_HOME</code> refers to the directory in which - you have installed Orion, and <code>$STRUTS_HOME</code> is the directory in - which you unpacked the Struts binary distribution.</p> - -<ul> - <li>Modify the file <code>$ORION_HOME/config/application.xml</code> to define - the two new applications, by adding the following declarations, immediately - following the <code>web-module</code> directive for the default web application:</li> -</ul> - -<pre><web-module id="strutsDoc" -path="$STRUTS_HOME/webapps/struts-documentation.war"/> -<web-module id="strutsExample" -path="$STRUTS_HOME/webapps/struts-example.war"/> -</pre> - -<ul> - <li>Modify the file <code>$ORION_HOME/config/default-web-site.xml</code> (or - the configuration file for any other Orion web site) to include the following - declarations, after the declaration for the <default-web-app> if any:</li> -</ul> - -<pre><web-app application="default" name="strutsDoc" - root="/struts-documentation"/> -<web-app application="default" name="strutsExample" - root="/struts-example"/> -</pre> - -<ul> - <li>After you start Orion, you should now be able to access these applications - (assuming you haven't changed the port number from the default of 80) at:</li> -</ul> - -<pre>http://localhost/struts-documentation -http://localhost/struts-example -</pre> - -<ul> - <li>Versions of Orion up to at least 1.0.3 have a bug related to ServletContext.getResource() - calls that prevent the Struts example application from working out of the - box. This manifests itself as a JSP error when you try to access the example - application, with the following message:<br/> - <code>javax.servlet.jsp.JspException: Missing resources attributeorg.apache.struts.action.MESSAGE</code><br/> - followed by an error traceback. There will also be an initialization error - message in the <code>ORION_HOME/log/global-application.log</code> log file. - To work around this problem, you can take the following steps:</li> - <ul> - <li>Go to the <code>$STRUTS_HOME/webapps</code> directory, where you will - note that Orion has automatically expanded each web application into an - unpacked directory structure.</li> - <li>Go to the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF</code> directory, - and copy the file <code>struts-config.xml</code> one directory up (that - is, into <code>$STRUTS_HOME/webapps/struts-example</code>.</li> - <li>Modify the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF/web.xm</code> - file, changing the value of the "config" initialization parameter (for the - action servlet) from <code>/WEB-INF/struts-config.xml</code> to <code>/action.xml</code>.</li> - <li>Restart Orion, and you should be able to access the example application.</li> - <li>Note that this workaround has a negative security-related side effect: - your <code>struts-conifig.xml</code> file can now be retrieved by remote - clients at the following URL:<br/> - <code>http://localhost/struts-example/struts-config.xml</code><br/> - Therefore, you should be sure you do not store sensitive information (such - as database passwords) in this file. </li> - </ul> -</ul> - -<h4><a name="silverstream">SilverStream Application Server 3.7.1</a></h4> - -<ul> - <li>Start the SilverStream application server.</li> - <li>Create an XML deployment plan for the "<code>struts-example.war</code>" - application. Call the file "<code>struts-example-depl-plan.xml</code>". - You can use the following contents for the file</li> -</ul> - -<hr/> - -<p>----- cut here -----</p> - -<pre> -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE warJarOptions PUBLIC - "-//SilverStream Software, Inc.//DTD J2EE WAR Deployment Plan//EN" - "deploy_war.dtd"> -<warJarOptions> -<warJar> -<warJarName>struts-example.war</warJarName> -<isEnabled>true</isEnabled> -<urls><el>struts-example</el></urls> -</warJar> -</warJarOptions> -</pre> - -<p>----- cut here -----</p> - -<hr/> - -<p>Create an XML deployment plan for the "<code>struts-documentation.war</code>" - application. Call the file "struts-documentation-depl-plan.xml". - You can use the following contents for the file:</p> - -<hr/> -<p>----- cut here -----</p> - -<pre> -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE warJarOptions PUBLIC - "-//SilverStream Software, Inc.//DTD J2EE WAR Deployment Plan//EN" - "deploy_war.dtd"> -<warJarOptions> -<warJar> -<warJarName>struts-example.war</warJarName> -<isEnabled>true</isEnabled> -<urls><el>struts-documentation</el></urls> -</warJar> -</warJarOptions> -</pre> - -<p>----- cut here -----</p> -<hr/> - -<p>Run the following "<code>SilverCmd DeployWAR</code>" commands to - deploy the applications. You can change 'localhost' to whatever server you - are deploying to. You can change 'Silvermaster' to whatever - database you are deploying to.</p> - <ul> - <li>SilverCmd DeployWar localhost Silvermaster struts-example.war -f struts-example-depl-plan.xml</li> - <li>SilverCmd DeployWar localhost Silvermaster struts-documentation.war -f struts-documentation-depl-plan.xml</li> - </ul> - -<h4><a name="tomcat_apache">Tomcat 3.1 (Or Later) With Apache</a></h4> - -<ul> - <li>These instructions assume you have successfully integrated Tomcat with Apache - according to the Tomcat documentation.</li> - <li>Copy "struts-documentation.war" and "struts-example.war" to your $TOMCAT_HOME/webapps - directory</li> - <li>Restart Tomcat if it is already running</li> - <li>Tomcat will generate a file "$TOMCAT_HOME/conf/tomcat-apache.conf" that - will be used by Apache. This file is regenerated every time you start Tomcat, - so copy this file to a safe place (such as your Apache configuration directory; - on Unix systems this is usually <code>/usr/local/apache/conf</code>.</li> - <li>If you are running Tomcat 3.1, Tomcat will not have generated the entries - for your new applications. Add the following lines to the <code>tomcat-apache.conf</code> - file that you have saved, replacing $TOMCAT_HOME with the path to your Tomcat - home directory:</li> -</ul> -<pre> -Alias /struts-documentation "$TOMCAT_HOME/webapps/struts-documentation - <Directory "$TOMCAT_HOME/webapps/struts-documentation> - Options Indexes FollowSymLinks - </Directory> - ApJServMount /struts-documentation/servlet /struts-documentation - <Location "/struts-documentation/WEB-INF/"> - AllowOverride None - deny from all - </Location> -Alias /struts-example "$TOMCAT_HOME/webapps/struts-example" - <Directory "$TOMCAT_HOME/webapps/struts-example> - Options Indexes FollowSymLinks - </Directory> - ApJServMount /struts-example/servlet /struts-example - <Location "/struts-example/WEB-INF/"> - AllowOverride None - deny from all - </Location> -</pre> -<ul> - <li>On all versions of Tomcat, the generated file above does not know anything - about extension mappings defined in a web.xml file, so the "*.do" URIs that - go to the controller servlet will not be recognized. To fix this, add the - following line to the saved version of "tomcat-apache.conf", after the corresponding - line for the .jsp extension:<br/> - <code>AddHandler jserv-servlet .do</code></li> - <li>Ensure that the saved version of "tomcat-apache.conf" is referenced in your - Apache "httpd.conf" configuration file. A typical use would have the following - line at the bottom of "httpd.conf":<br/> - <code>Include /usr/local/apache/conf/tomcat-apache.conf</code></li> - <li>In order to recognize "index.jsp" as a default page for web applications, - search in your "httpd.conf" for a "DirectoryIndex" directive. If you have - one, add "index.jsp" to the end of the list, so that it might look like this:<br/> - <code>DirectoryIndex index.html index.jsp</code><br/> - If you do not have such an entry, add one like this:<br/> - <code>DirectoryIndex index.jsp</code></li> - <li>Restart Apache to make it aware of the new applications. You should now - be able to access the applications from a browser like this:<br/> - <code>http://localhost/struts-documentation<br/> - http://localhost/struts-example</code></li> -</ul> -<h4><a name="wls6">Weblogic 5.1 (service pack 8)</a></h4> -<ul> - <li>Obtain and install the Xerces XML parser (problems have been reported with - the Sun reference implementation). Put xerces.jar in your WebLogic system - path.</li> - <li>Obtain and unpack the Struts binary distribution (this procedure assumes - it was extracted to <code>c:\jakarta-struts</code>).</li> - <li>Add an entry to weblogic.properties for each of the Struts web applications - that you would like to configure. For example, to make the struts-example - application available, add the following line to weblogic.properties:<br/> - <code>weblogic.httpd.webApp.strutsexample=<br/> - c:/jakarta-struts/webapps/struts-example.war</code></li> - <li>You do not need to include struts.jar or any of the application specific - classes in the WebLogic classpath, since this will be done automatically (unless - deploying an unpacked web archive- see below).</li> - <li>Start WebLogic server and point your web browser to the struts application. - For example, to connect to the example application added in step 3:<br/> - <code>http://localhost:7001/strutsexample</code></li> - <li>This example application depends on the Struts specific resource file ApplicationResources.properties - to be present on the classpath. However, WebLogic only extracts *.class files - from the archive so this file will not be found, resulting in an error the - first time it is needed- something similar to: javax.servlet.ServletException: - runtime failure in custom tag 'message'. Steps 6 & 7 will need to be performed - for this application, and any other that relies on ApplicationResources.properties.</li> - <li>Extract ApplicationResources.properties from the *.war file, and manually - copy it to the respective package in the _tmp_war_ directory WebLogic created - for this application. Again referring to the struts-example application, this - would be:<br/> - <code>c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample</code></li> - <li>Restart WebLogic. You will now be able to run the application:<br/> - <code>http://localhost:7001/strutsexample</code></li> -</ul> -<p>The above steps should be followed for applications deployed as *.war files. - For unpacked web applications, configuration involves adding both <code>struts.jar</code> - and <code>/WEB-INF/classes</code> to the WebLogic classpath. For this reason, - I would suggest deploying applications as war files to WebLogic. However, the - same example application can be successfully deployed in extracted format by - modifying weblogic.properties (assuming the war was extracted to directory webapps/struts-example):</p> -<p><code>weblogic.httpd.webApp.strutsexample=<br/> - c:/jakarta-struts/webapps/struts-example/</code></p> -<p>And starting WebLogic with the updated WebLogic classpath. For example:</p> -<p><code>c:\jdk1.3\bin\java -ms16m -mx64m<br/> - -classpath c:\weblogic\lib\weblogic510sp8boot.jar;</code></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-wls5.xml Index: installation-wls5.xml =================================================================== <?xml version="1.0"?> <document url="./installation-wls5.xml"> <properties> <author>Robert Hayden</author> <author>Wong Kok Kai</author> <title>The Struts Framework Project - Installation - Weblogic 5.1 sp8</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="wls5">Weblogic 5.1 (service pack 8)</a></h3> <ul> <li>Obtain and install the Xerces XML parser (problems have been reported with the Sun reference implementation). Put xerces.jar in your WebLogic system path.</li> <li>Obtain and unpack the Struts binary distribution (this procedure assumes it was extracted to <code>c:\jakarta-struts</code>).</li> <li>Add an entry to weblogic.properties for each of the Struts web applications that you would like to configure. For example, to make the struts-example application available, add the following line to weblogic.properties:<br/> <code>weblogic.httpd.webApp.strutsexample=<br/> c:/jakarta-struts/webapps/struts-example.war</code></li> <li>You do not need to include struts.jar or any of the application specific classes in the WebLogic classpath, since this will be done automatically (unless deploying an unpacked web archive- see below).</li> <li>Start WebLogic server and point your web browser to the struts application. For example, to connect to the example application added in step 3:<br/> <code>http://localhost:7001/strutsexample</code></li> <li>This example application depends on the Struts specific resource file ApplicationResources.properties to be present on the classpath. However, WebLogic only extracts *.class files from the archive so this file will not be found, resulting in an error the first time it is needed- something similar to: javax.servlet.ServletException: runtime failure in custom tag 'message'. Steps 6 & 7 will need to be performed for this application, and any other that relies on ApplicationResources.properties.</li> <li>Extract ApplicationResources.properties from the *.war file, and manually copy it to the respective package in the _tmp_war_ directory WebLogic created for this application. Again referring to the struts-example application, this would be:<br/> <code>c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample</code></li> <li>Restart WebLogic. You will now be able to run the application:<br/> <code>http://localhost:7001/strutsexample</code></li> </ul> <p>The above steps should be followed for applications deployed as *.war files. For unpacked web applications, configuration involves adding both <code>struts.jar</code> and <code>/WEB-INF/classes</code> to the WebLogic classpath. For this reason, I would suggest deploying applications as war files to WebLogic. However, the same example application can be successfully deployed in extracted format by modifying weblogic.properties (assuming the war was extracted to directory webapps/struts-example):</p> <p><code>weblogic.httpd.webApp.strutsexample=<br/> c:/jakarta-struts/webapps/struts-example/</code></p> <p>And starting WebLogic with the updated WebLogic classpath. For example:</p> <p><code>c:\jdk1.3\bin\java -ms16m -mx64m<br/> -classpath c:\weblogic\lib\weblogic510sp8boot.jar;</code></p> <hr/> <h4>Additional Recommendations</h4> <ul> <li>Servlet and JSP-Reloading should be turned off. First, you pay a performance penalty. Depending on the number of JSPs, the number of requests and the configured checking interval, the server will slow down. Second, with JSP- and Servlet reloading, one opens the door for various Weblogic classloader problems, that are difficult to diagnose, difficult to handle and often lead to lost HTTP-sessions.</li> <li>Set the name of the <code>sessionid</code> to <code>JSESSIONID</code>, if cookies are used for session tracking and to jsessionid, if sessions are URL-based. (There are additional problems related to URL-based sessions, caused from BEA's way to encode the session id (J2EE-incompatible) as query-param. Especially <bean:include> will not work with URL-based sessions yet. However, using the correct session name solves at least some problems.)</li> <li>Configure the JSP-Servlet registration in <code>weblogic.properties</code> for maximum J2EE-compliance and/or for maximum performance.</li></ul> <p>The JSP-Servlet supports some initialization parameters that can be customized to get best performance, maximum compliance or (as shown below) easier debugging:</p> <pre> weblogic.httpd.initArgs.*.jsp=\ pageCheckSeconds=-1,\ setEmptyStrings=false,\ compileCommand=./_jspCompiler_.cmd,\ workingDir=/weblogic/myserver/tmp_classfiles,\ keepgenerated=true,\ debug=true,\ verbose=true </pre> <p>In the above example, the batch file (<code>_jspCompiler_.cmd</code>) invokes jikes which results dramatically reduced startup times (jikes is about three times faster than javac.) The batchfile contains only a single line:</p> <pre>@jikes -g -nowarn %*</pre> <p>The next configuration could be used when all tests have been done and speed is the major concern ...</p> <pre> weblogic.httpd.initArgs.*.jsp=\ pageCheckSeconds=-1,\ setEmptyStrings=false,\ compileCommand=./_jspCompiler_.cmd,\ workingDir=/weblogic/myserver/tmp_classfiles,\ keepgenerated=false,\ debug=false,\ verbose=false </pre> <p>... together with ...</p> <pre>@jikes -O -nowarn %*</pre> <p>Weblogic supports similar settings through <code><context-params></code> in <code>web.xml</code> (Please read the latest documentation at the BEA website for details.)</p> <p>For additional issues, see also <a href="http://www.mail-archive.com/struts-dev@jakarta.apache.org/msg00284.html">More fixes for WLS 5.1 SP8</a> from the Struts Developer mailing list</p> <hr/> <ul> <li>Author: Robert Hayden</li> <li>Author: Wong Kok Kai</li> <li>Author: Matthias Kerkhoff </li> </ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-jr30.xml Index: installation-jr30.xml =================================================================== <?xml version="1.0"?> <document url="./installation-jr30.xml"> <properties> <author>Eric Wu</author> <title>The Struts Framework Project - Installation - JRun 3.0</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="jrun">JRUN 3.0 SP2A, VERSION 3.02A.11614</a></h3> <b>Tested with: Microsoft IIS 5.0, Windows 2000</b> <h4>Important Note:</h4> <p>At the moment, JRun is not fully compliant with the JSP 1.1/1.2 specification. </p> <p>Specifically, the automatic type conversions for custom tag parameters specified in "Issue 7" of the JSP 1.1 Errata and in the JSP 1.2 Proposed Final Draft have not yet been implemented.</p> <p>As it stands, JSP pages that make use of Struts taglibs whose parameters require conversion (such as booleans) will not compile under JRun. This includes the Struts Example Application. Attempting to run the example application will result in an exception similar to the following being thrown:</p> <pre> /struts-example/index.jsp: javax.servlet.ServletException: Compilation error occured: allaire.jrun.scripting.DefaultCFE: Errors reported by compiler: c:/JRun/servers/default/Struts Example/WEB-INF/jsp/jrun__index2ejspa.java:41:1:41:27: Error: No match was found for method "setLocale(java.lang.String)". </pre> <p>(For more details see refer to:<br/> <font size="-1"><a href="http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html">http://www.mail-archive.com/struts-user@jakarta.apache.org/msg01860.html</a></font>)</p> <p>The following instructions describe how to install the Struts Example Application under JRun. A subsequent section describes how the Struts Example Application can be patched to work with Struts</p> <p>The following instructions assume the following:</p> <ul> <li>JRun has been installed and integrated with the web server of choice.</li> <li>$APP_SERVER_NAME is the name of the application server used to host the application. (When JRun is first installed, it creates an application server called JRun Default Server).</li> <li>$APP_SERVER_DIR is the directory used to hold applications hosted by $APP_SERVER_NAME. For the JRun Default Server, the directory is $JRUN_HOME/servers/default where $JRUN_HOME is the directory where JRun is installed.</li> </ul> <h4>Installing the struts example application</h4> <ul> <li>Login to the JRun Management Console.</li> <li>On the left pane, select $APP_SERVER_NAME. A page showing the current server status will be shown on the right pane.</li> <li>On the right pane, click on the WAR Deployment link. A page containing a list of the currently deployed web applications will be shown.</li> <li>On the right pane, click on Deploy an Application. Complete the Web Application Information form as follows:</li> <ul> <li>Servlet War File or Directory: Enter the full path where struts-example.war is found or click on Browse to select the path.</li> <li>JRun Server Name: $APP_SERVER_NAME</li> <li>Application Name: Struts Example</li> <li>Application Hosts: All Hosts</li> <li>Application URL: /struts-example</li> <li>Application Deploy Directory: will default to $APP_SERVER_NAME/Struts Example (or the name as specified for Application Name).</li> </ul> <li>Once the form is complete, click on the Deploy button.</li> <li>If deployment is successful, restart the application server by clicking on <code>$APP_SERVER_NAME</code> on the left pane. A page showing the current server status will be shown on the right pane. Click the Restart Server button to restart the application server.</li> <li>Test the sample application by using the following URL in the browser:<br/> <code>http://hostname/struts-example/index.jsp</code><br/> The struts-documentation.war can be installed using the same procedure.</li> </ul> <h4>Installing unpacked web applications</h4> <p>The above steps should be followed for applications deployed as <code>*.war</code> files.</p> <p>For unpacked web applications, configuration involves the following steps:</p> <ul> <li>From the JRun Management Console, select <code>$APP_SERVER_NAME</code> (on the left pane) and click on WAR Deployment (on the right pane).</li> <li>On the right pane, click on Create an Application and complete the Web Application Information form as follows:</li> <li>JRun Server Name: $APP_SERVER_NAME</li> <ul> <li>Application Name: myApplication</li> <li>Application Hosts: All Hosts</li> <li>Application URL: /myApplication</li> <li>Application Deploy Directory: will default to<br/> <code>$APP_SERVER_NAME/myApplication</code></li> </ul> <li>Click on Create to submit the form.</li> <li>Once the web application is created, install and configure the struts components (struts.jar, struts*.tld, etc) for the web application under <code>$APP_SERVER_NAME/myApplication/WEB-INF</code></li> <li>Install the remaining components of the application: .class files, JSP pages,.properties files etc as required.</li> <li>To configure the extension mapping of the request URI (ie *.do) to the action servlet, expand <code>$APP_SERVER_NAME</code> on the left pane, expand the Web Applications branch and click on myApplication. The right pane will display the configuration options for myApplication. Click on Servlet URL Mappings. A list of existing mappings will be shown. Click the Edit button and create the following entry:</li> <ul> <li>Virtual Path/Extension: *.do</li> <li>Servlet Invoked: action</li> </ul> <li>Click on the Update button to save the changes.</li> <li>Restart the application server.</li> <li>The application should now be accessible from the browser.</li> </ul> <p>The JRun application server will need to be restarted each time one of the following changes are made to the web application:</p> <ul> <li><code>.class</code> or <code>.jar</code> files are modified</li> <li><code>.properties</code> files are modified</li> <li><code>.xml</code> files are modified</li> </ul> <h4>Patching the struts example application</h4> <p>As mentioned at the beginning of these notes, the Struts Example Application will not run under JRun without modification. The following changes will need to be made:</p> <ul> <li>index.jsp, logon.jsp: Change <html:html locale="true"> to <br/><html:html locale=<%= true %>></li> <li>registration.jsp, subscription.jsp: Change all instances of filter="true" to <br/>filter=<%= true %></li> </ul> <hr/> <ul><li>Author: Eric Wu</li></ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-oas.xml Index: installation-oas.xml =================================================================== <?xml version="1.0"?> <document url="./installation-oas.xml"> <properties> <title>The Struts Framework Project - Installation - Orion Application Server</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h4><a name="orion">Orion Application Server</a></h4> <p>In the steps below, <code>$ORION_HOME</code> refers to the directory in which you have installed Orion, and <code>$STRUTS_HOME</code> is the directory in which you unpacked the Struts binary distribution.</p> <ul> <li>Modify the file <code>$ORION_HOME/config/application.xml</code> to define the two new applications, by adding the following declarations, immediately following the <code>web-module</code> directive for the default web application:</li> </ul> <pre><web-module id="strutsDoc" path="$STRUTS_HOME/webapps/struts-documentation.war"/> <web-module id="strutsExample" path="$STRUTS_HOME/webapps/struts-example.war"/> </pre> <ul> <li>Modify the file <code>$ORION_HOME/config/default-web-site.xml</code> (or the configuration file for any other Orion web site) to include the following declarations, after the declaration for the <default-web-app> if any:</li> </ul> <pre><web-app application="default" name="strutsDoc" root="/struts-documentation"/> <web-app application="default" name="strutsExample" root="/struts-example"/> </pre> <ul> <li>After you start Orion, you should now be able to access these applications (assuming you haven't changed the port number from the default of 80) at:</li> </ul> <pre>http://localhost/struts-documentation http://localhost/struts-example </pre> <ul> <li>Versions of Orion up to at least 1.0.3 have a bug related to ServletContext.getResource() calls that prevent the Struts example application from working out of the box. This manifests itself as a JSP error when you try to access the example application, with the following message:<br/> <code>javax.servlet.jsp.JspException: Missing resources attributeorg.apache.struts.action.MESSAGE</code><br/> followed by an error traceback. There will also be an initialization error message in the <code>ORION_HOME/log/global-application.log</code> log file. To work around this problem, you can take the following steps:</li> <ul> <li>Go to the <code>$STRUTS_HOME/webapps</code> directory, where you will note that Orion has automatically expanded each web application into an unpacked directory structure.</li> <li>Go to the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF</code> directory, and copy the file <code>struts-config.xml</code> one directory up (that is, into <code>$STRUTS_HOME/webapps/struts-example</code>.</li> <li>Modify the <code>$STRUTS_HOME/webapps/struts-example/WEB-INF/web.xm</code> file, changing the value of the "config" initialization parameter (for the action servlet) from <code>/WEB-INF/struts-config.xml</code> to <code>/action.xml</code>.</li> <li>Restart Orion, and you should be able to access the example application.</li> <li>Note that this workaround has a negative security-related side effect: your <code>struts-conifig.xml</code> file can now be retrieved by remote clients at the following URL:<br/> <code>http://localhost/struts-example/struts-config.xml</code><br/> Therefore, you should be sure you do not store sensitive information (such as database passwords) in this file. </li> </ul> </ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-sas371.xml Index: installation-sas371.xml =================================================================== <?xml version="1.0"?> <document url="./installation-sas371.xml"> <properties> <author>John Rousseau</author> <title>The Struts Framework Project - Installation - Silverstream</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="sas371">SilverStream Application Server 3.7.1</a></h3> <ul> <li>Start the SilverStream application server.</li> <li>Create an XML deployment plan for the "<code>struts-example.war</code>" application. Call the file "<code>struts-example-depl-plan.xml</code>". You can use the following contents for the file</li> </ul> <hr/> <p>----- cut here -----</p> <pre> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE warJarOptions PUBLIC "-//SilverStream Software, Inc.//DTD J2EE WAR Deployment Plan//EN" "deploy_war.dtd"> <warJarOptions> <warJar> <warJarName>struts-example.war</warJarName> <isEnabled>true</isEnabled> <urls><el>struts-example</el></urls> </warJar> </warJarOptions> </pre> <p>----- cut here -----</p> <hr/> <p>Create an XML deployment plan for the "<code>struts-documentation.war</code>" application. Call the file "struts-documentation-depl-plan.xml". You can use the following contents for the file:</p> <hr/> <p>----- cut here -----</p> <pre> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE warJarOptions PUBLIC "-//SilverStream Software, Inc.//DTD J2EE WAR Deployment Plan//EN" "deploy_war.dtd"> <warJarOptions> <warJar> <warJarName>struts-example.war</warJarName> <isEnabled>true</isEnabled> <urls><el>struts-documentation</el></urls> </warJar> </warJarOptions> </pre> <p>----- cut here -----</p> <hr/> <p>Run the following "<code>SilverCmd DeployWAR</code>" commands to deploy the applications. You can change 'localhost' to whatever server you are deploying to. You can change 'Silvermaster' to whatever database you are deploying to.</p> <ul> <li>SilverCmd DeployWar localhost Silvermaster struts-example.war -f struts-example-depl-plan.xml</li> <li>SilverCmd DeployWar localhost Silvermaster struts-documentation.war -f struts-documentation-depl-plan.xml</li> </ul> <hr/> <ul><li>Author: John Rousseau</li></ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-tc31.xml Index: installation-tc31.xml =================================================================== <?xml version="1.0"?> <document url="./installation-tc31.xml"> <properties> <author>Craig R. McClanahan</author> <title>The Struts Framework Project - Installation - Tomcat 3.1 with Apache</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="tc31">Tomcat 3.1 (Or Later) With Apache</a></h3> <ul> <li>These instructions assume you have successfully integrated Tomcat with Apache according to the Tomcat documentation.</li> <li>Copy "struts-documentation.war" and "struts-example.war" to your $TOMCAT_HOME/webapps directory</li> <li>Restart Tomcat if it is already running</li> <li>Tomcat will generate a file "$TOMCAT_HOME/conf/tomcat-apache.conf" that will be used by Apache. This file is regenerated every time you start Tomcat, so copy this file to a safe place (such as your Apache configuration directory; on Unix systems this is usually <code>/usr/local/apache/conf</code>.</li> <li>If you are running Tomcat 3.1, Tomcat will not have generated the entries for your new applications. Add the following lines to the <code>tomcat-apache.conf</code> file that you have saved, replacing $TOMCAT_HOME with the path to your Tomcat home directory:</li> </ul> <pre> Alias /struts-documentation "$TOMCAT_HOME/webapps/struts-documentation <Directory "$TOMCAT_HOME/webapps/struts-documentation> Options Indexes FollowSymLinks </Directory> ApJServMount /struts-documentation/servlet /struts-documentation <Location "/struts-documentation/WEB-INF/"> AllowOverride None deny from all </Location> Alias /struts-example "$TOMCAT_HOME/webapps/struts-example" <Directory "$TOMCAT_HOME/webapps/struts-example> Options Indexes FollowSymLinks </Directory> ApJServMount /struts-example/servlet /struts-example <Location "/struts-example/WEB-INF/"> AllowOverride None deny from all </Location> </pre> <ul> <li>On all versions of Tomcat, the generated file above does not know anything about extension mappings defined in a web.xml file, so the "*.do" URIs that go to the controller servlet will not be recognized. To fix this, add the following line to the saved version of "tomcat-apache.conf", after the corresponding line for the .jsp extension:<br/> <code>AddHandler jserv-servlet .do</code></li> <li>Ensure that the saved version of "tomcat-apache.conf" is referenced in your Apache "httpd.conf" configuration file. A typical use would have the following line at the bottom of "httpd.conf":<br/> <code>Include /usr/local/apache/conf/tomcat-apache.conf</code></li> <li>In order to recognize "index.jsp" as a default page for web applications, search in your "httpd.conf" for a "DirectoryIndex" directive. If you have one, add "index.jsp" to the end of the list, so that it might look like this:<br/> <code>DirectoryIndex index.html index.jsp</code><br/> If you do not have such an entry, add one like this:<br/> <code>DirectoryIndex index.jsp</code></li> <li>Restart Apache to make it aware of the new applications. You should now be able to access the applications from a browser like this:<br/> <code>http://localhost/struts-documentation<br/> http://localhost/struts-example</code></li> </ul> <hr/> <ul><li>Author: Craig R. McClanahan</li></ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-ubs72.xml Index: installation-ubs72.xml =================================================================== <?xml version="1.0"?> <document url="./installation-ubs72.xml"> <properties> <author>Mike Schachter</author> <title>The Struts Framework Project - Installation - Bluestone UBS 7.2</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="bluestone">Bluestone Universal Business Server 7.2</a></h3> <ul> <li>You need UBS version 7.2 to run war file applications. The UBS 7.2.2 evaluation is located <a href="http://www.bluestone.com/SaISAPI.dll/SaServletEngine.class/products/downloads.jsp">here</a>. If you're using version 7.2.1, you need to download the WAR file patch, located in the product enhancement section of Bluestone's website <a href="http://www.bluestone.com/SaISAPI.dll/SaServletEngine.class/products/wfe.jsp">here</a> </li> <li> After installation of the correct version and/or patch of UBS 7.2, you need to modify your apserver.txt file to point to the correct directory for your war file applications. Look for the section that says something similar to the following:<br /> <pre> [SaServletEngine.class] session_affinity=1 type=1 program=/SaServletEngine.class file_path=f:\webapps host=localhost:20000 </pre> </li> <li>Use the directory specified by the "file_path" variable, or modify it to point to your own custom webapp directory. Copy the "struts-documention.war" and "struts-example.war" files into that webapp directory, and start the UBS (read documentation distributed with UBS for information on how to start it if necessary). Your webapps are now accessible from the following URL: <p align="center"> http://localhost/<PLUGIN>/SaServletEngine.class/struts-example/<br /> http://localhost/<PLUGIN>/SaServletEngine.class/struts-documentation/ </p> </li> <li> Note: "<PLUGIN>" represents the plugin you are using for your specific webserver. For apache on Windows, it might be "cgi-bin/SaCGI.exe", for IIS on Windows, it might be "scripts/SaCGI.exe" or "scripts/ISAPI.dll". Consult the UBS documentation for more information. </li> </ul> <hr/> <ul> <li>Author: Mike Schachter</li> </ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document> 1.1 jakarta-struts/src/doc/installation-was352.xml Index: installation-was352.xml =================================================================== <?xml version="1.0"?> <document url="./installation-was352.xml"> <properties> <author>dIon Gillard</author> <title>The Struts Framework Project - Installation - WebSphere 3.5.2</title> </properties> <body> <section name="Installing Struts with your servlet container" href="Containers"> <h3><a name="was352">WebSphere Application Server 3.5 FixPack 2</a></h3> <ul> <li>In the steps below, <code>$WAS_HOME</code> refers to the directory in which you have installed WebSphere Application Server, and <code>$STRUTS_HOME</code> is the directory in which you unpacked the Struts binary distribution.</li> <li>WebSphere before 3.5.2 did not support JSP 1.1 and Servlet 2.2, which made it difficult to get Struts functioning without massive code changes. Please upgrade to 3.5.2 (3.5 with FixPack 2) before attempting to use Struts. See <a href="http://www.ibm.com/software/webservers/appserv/efix.html">http://www.ibm.com/software/webservers/appserv/efix.html</a> for download and install instructions on FixPack 2 for WebSphere 3.5</li> <li>Warning: Struts will not work with WebSphere 3.5.2 out of the box. Fixes expected to be in WebSphere 3.5.3 (not released at time of writing) should correct this. However, you can successfully get WebSphere 3.5.2 working with Struts.</li> <li>Make sure the WebSphere Application Server is started. Under Windows NT/2000, it's the "IBM WS AdminServer" service.</li> <li>Start the WebSphere Administrative Console.</li> <li>Once it's started, select "Convert a War File" from the tasks toolbar option, or from the Console->Tasks menu. This will cause a "Convert War File" Wizard dialog to appear.</li> <li>Select a Servlet Engine to host the web application that will result from converting the War file, e.g. "Default Servlet Engine", by expanding the tree control under Nodes. Press the Next button.</li> <li>Select a Virtual Host to associate the resulting web application with, e.g. "default host". Press the Next button.</li> <li>Press the Browse button and choose the <code>$STRUTS_HOME/webapps/struts-example.war</code>. Press the Next button</li> <li>Select a destination directory for the resulting web application, e.g. <code>$WAS_HOME/hosts/default_host</code>. Press the Next button</li> <li>Enter a "Web Application Web Path", e.g. struts-example, and a "Web Application Name", e.g. struts-example. Press the Finish button.</li> <li>You should, after a lengthy pause, get a message box with the text Command "convert war file" completed successfully. Press Ok.</li> <li>You now need to add jaxp.jar and a jaxp compatible parser, e.g. parser.jar from JAXP 1.0.1 to the struts-example web application's servlets directory, e.g. <code>$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets</code></li> <li>At this point, if WAS 3.5.2 correctly implemented Servlet 2.2, all would be fine. However, WAS 3.5.2 returns null for calls to <code>ServletContext.getResource(String)</code> or <code>ServletContext.getResourceAsStream(String)</code>. This manifests itself as an exception in the application server stdout log, e.g. <code>default_server_stdout.log.</code></li> <li>Warning: Don't be fooled by the fact that the web application starts successfully from the Admin Console. It actually doesn't. The Admin Console is lying. If you try to access the webapp e.g. <code>http://localhost/struts-example/</code> it will fail.</li> <li>At this point, you need to patch the Struts source. There are three places <code>getResourceAsStream</code> is called:</li></ul> <pre> ResourceTag.doStartTag() ActionServlet.initMapping() PropertyMessageResources.loadLocale(String) </pre> <p>of these, <code>ActionServlet</code> is the most important.</p> <ul><li>Change the source from</li></ul> <pre> // Acquire an input stream to our configuration resource InputStream input = getServletContext().getResourceAsStream(config); </pre> <p>to</p> <pre> // Acquire an input stream to our configuration resource InputStream input = new java.io.FileInputStream(getServletContext().getRealPath(config)); </pre> <ul><li> Make similar changes to the other classes if necessary.</li> <li>Recompile ActionServlet and copy the <code>.class</code> file to <br/> <code>$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets/<br/> org/apache/struts/action/ActionServlet.class</code></li> <li>Another bug with WAS 3.5.2's classloaders is that Class.getResource() wont load a resource from a jar, so you must copy<br/> <code>$STRUTS_HOME/lib/struts-config_1_0.dtd</code> <br/> to <br/> <code>$WAS_HOME/AppServer/hosts/default_host/struts-example/servlets/org/apache/struts/resources/struts-config_1_0.dtd</code><br/> or be connected to the Internet to fetch the dtd from the jakarta web site.</li> <li>Start your webapp in the Admin Console</li> <li>Test the example application by loading the following URL in your browser of choice: <a href="http://localhost/struts-example/">http://localhost/struts-example/" >http://localhost/struts-example/</a></li> </ul> <hr/> <ul><li>Author: dIon Gillard</li></ul> <hr/> <p>Back to <a href="installation.html#Containers">Installation</a></p> </section> </body> </document>