You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by hu...@apache.org on 2006/01/21 01:21:00 UTC
svn commit: r370938 [35/50] - in /struts: action/trunk/
action/trunk/conf/java/ action/trunk/src/java/org/apache/struts/
action/trunk/src/java/org/apache/struts/action/
action/trunk/src/java/org/apache/struts/chain/
action/trunk/src/java/org/apache/str...
Modified: struts/action/trunk/xdocs/userGuide/installation-ubs72.xml
URL: http://svn.apache.org/viewcvs/struts/action/trunk/xdocs/userGuide/installation-ubs72.xml?rev=370938&r1=370937&r2=370938&view=diff
==============================================================================
--- struts/action/trunk/xdocs/userGuide/installation-ubs72.xml (original)
+++ struts/action/trunk/xdocs/userGuide/installation-ubs72.xml Fri Jan 20 16:19:02 2006
@@ -1,53 +1,79 @@
<?xml version="1.0"?>
<document url="installation-ubs72.html">
- <properties>
- <title>The Struts Framework Project - Installation - Bluestone UBS 7.2</title>
- </properties>
+ <properties>
+ <title>The Struts Framework Project - Installation - Bluestone UBS
+ 7.2</title>
+ </properties>
- <body>
-<section name="6.2 Installation" href="installation">
-<subsection name="Installing Struts with your servlet container" href="Containers">
-<h4 id="bluestone">Bluestone Universal Business Server 7.2</h4>
+ <body>
+ <section name="6.2 Installation" href="installation">
+ <subsection name="Installing Struts with your servlet container"
+ href="Containers">
+ <h4 id="bluestone">Bluestone Universal Business Server
+ 7.2</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>
+ <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 class="center"> http://localhost/<PLUGIN>/SaServletEngine.class/struts-example/<br />
- http://localhost/<PLUGIN>/SaServletEngine.class/struts-documentation/
- </p>
- </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 class="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/>
- <p>Back to <a href="installation.html#Containers">Installation</a></p>
-</subsection>
-</section>
-</body>
+ <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/>
+ <p>Back to
+ <a href="installation.html#Containers">Installation</a>
+ </p>
+ </subsection>
+ </section>
+ </body>
</document>
Modified: struts/action/trunk/xdocs/userGuide/installation-was352-x.xml
URL: http://svn.apache.org/viewcvs/struts/action/trunk/xdocs/userGuide/installation-was352-x.xml?rev=370938&r1=370937&r2=370938&view=diff
==============================================================================
--- struts/action/trunk/xdocs/userGuide/installation-was352-x.xml (original)
+++ struts/action/trunk/xdocs/userGuide/installation-was352-x.xml Fri Jan 20 16:19:02 2006
@@ -1,81 +1,126 @@
<?xml version="1.0"?>
<document url="installation-was352-x.html">
- <properties>
- <title>The Struts Framework Project - Installation - WebSphere 3.5.2</title>
- </properties>
+ <properties>
+ <title>The Struts Framework Project - Installation - WebSphere
+ 3.5.2</title>
+ </properties>
- <body>
-<section name="6.2 Installation" href="installation">
-<subsection name="Installing Struts with your servlet container" href="Containers">
+ <body>
+ <section name="6.2 Installation" href="installation">
+ <subsection name="Installing Struts with your servlet container"
+ href="Containers">
-<h4 id="was352">WebSphere Application Server 3.5 and the Example Application</h4>
+ <h4 id="was352">WebSphere Application Server 3.5 and the
+ Example Application</h4>
-<p>Server: Windows 2000 Server with WebSphere 3.5.3 Advanced</p>
-<ol>
-<li>Start up the adminserver. </li>
-<li>Start up Admin Console. </li>
-<li>Use the Convert War file task to convert the struts-example.war from the
-struts-b1 distrib as-is. </li>
-<li>Convert to the default_server, default servlet engine and standard
-install directory (c:\websphere\appserver\hosts\default_host). </li>
-<li>Create a WEB-INF directory in the servlets dir and copy
-struts-config.xml, database.xml AND web.xml into it (Keep WEB-INF with all
-the TLD's under web - both WEB-INF directories must be present). </li>
-<li>Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and parser.jar to the servlets
-directory of the strut-example webapp. </li>
-<li>In the servlets directory, open struts.jar with WinZip. Extract the
-three DTD's (struts-config_1_0.dtd, web-app_2_2.dtd and web-app_2_3.dtd)
-into the servlets directory making sure you use folder names (so the files
-extract to servlets/org/apache/struts/resources). </li>
-<li>Click on struts-example in the Admin Console under Default Server/Default
-Servlet Engine and click the advanced tab on the right hand side of the
-screen. </li>
-<li>Down where it says Default Error Page, enter /ErrorReporter and then
-click Apply. </li>
-<li>Start the Default Server via the Admin Console. You should see a whole
-bunch of ActionServlet messages in the default_host_stdout.log file with no
-exceptions. </li>
-<li>Via a browser accessed the app using
-http://localhost/struts-example/index.jsp. </li>
-<li>If it returns "Application not Available" then go back to the Admin
-Console, right-click on struts-example and select Restart WebApp. </li>
-<li>Once it reports success, go back to the URL above and try again - it
-should work flawlessly. </li>
-</ol>
-<p>
-For whatever reason, some installations do not like XML files that reference
-PUBLIC DTD's - if in looking at the default_host_stdout.log file you see
-errors about invalid public URL references during DTD registrations, or if
-your pages say "cannot find //logon or //saveRegistration (ie. action
-mappings) then do the following:</p>
-<ol>
-<li>Stop Default Server</li>
-<li>Go to servlets\WEB-INF\ and edit web.xml and struts_config.xml.</li>
-<li>In the DOCTYPE declaration, change the word PUBLIC to SYSTEM and
-completely remove the line that reads "-//Sun Microsystems, Inc.//DTD Web
-Application 2.2//EN" from web.xml and remove "-//Apache Software
-Foundation//DTD Struts Configuration 1.0//EN" from struts-config.xml. </li>
-<li>Save these changes and go back to step 10 above.</li>
-</ol>
-<p>Just as a troubleshooting guide - </p>
-<p>If you are getting errors like "Cannot find ActionMappings, etc..." or
-"Cannot find key org.apache.struts.MESSAGE" then your application is most
-likely still bombing on the struts-config issue that Richard discovered.
-The above steps SHOULD correct that leaving nothing out. If you are getting
-404 errors about //logon or something not found, then you are still having
-XML config troubles and it is not initializing the Action servlet properly.
-Follow the steps above in regards to DTD's and it should work.</p>
-<p>As a final thought, I obviously haven't gotten to test too much but I don't
-believe that there are ANY coding changes that need to be made to the actual
-struts source. Everything about getting it to work in WebSphere has been a
-WebSphere configuration issue thus far (and I don't think I'll be having any
-more). </p>
-<p>If changing the DTD's to SYSTEM, do so ONLY AFTER using the Convert a War
-util. Ant doesn't seem to like it the other way! :)</p>
- <hr/>
- <p>Back to <a href="installation.html#Containers">Installation</a></p>
-</subsection>
-</section>
-</body>
+ <p>Server: Windows 2000 Server with WebSphere 3.5.3
+ Advanced</p>
+ <ol>
+ <li>Start up the adminserver.</li>
+ <li>Start up Admin Console.</li>
+ <li>Use the Convert War file task to convert the
+ struts-example.war from the
+ struts-b1 distrib as-is.</li>
+ <li>Convert to the default_server, default servlet engine
+ and standard
+ install directory
+ (c:\websphere\appserver\hosts\default_host).</li>
+ <li>Create a WEB-INF directory in the servlets dir and
+ copy
+ struts-config.xml, database.xml AND web.xml into it
+ (Keep WEB-INF with all
+ the TLD's under web - both WEB-INF directories must be
+ present).</li>
+ <li>Copy jaxp 1.0.1's (NOT 1.1.1's) jaxp.jar and
+ parser.jar to the servlets
+ directory of the strut-example webapp.</li>
+ <li>In the servlets directory, open struts.jar with
+ WinZip. Extract the
+ three DTD's (struts-config_1_0.dtd, web-app_2_2.dtd
+ and web-app_2_3.dtd)
+ into the servlets directory making sure you use folder
+ names (so the files
+ extract to servlets/org/apache/struts/resources).</li>
+ <li>Click on struts-example in the Admin Console under
+ Default Server/Default
+ Servlet Engine and click the advanced tab on the right
+ hand side of the
+ screen.</li>
+ <li>Down where it says Default Error Page, enter
+ /ErrorReporter and then
+ click Apply.</li>
+ <li>Start the Default Server via the Admin Console. You
+ should see a whole
+ bunch of ActionServlet messages in the
+ default_host_stdout.log file with no
+ exceptions.</li>
+ <li>Via a browser accessed the app using
+ http://localhost/struts-example/index.jsp.</li>
+ <li>If it returns "Application not Available" then go back
+ to the Admin
+ Console, right-click on struts-example and select
+ Restart WebApp.</li>
+ <li>Once it reports success, go back to the URL above and
+ try again - it
+ should work flawlessly.</li>
+ </ol>
+ <p>
+ For whatever reason, some installations do not like XML
+ files that reference
+ PUBLIC DTD's - if in looking at the
+ default_host_stdout.log file you see
+ errors about invalid public URL references during DTD
+ registrations, or if
+ your pages say "cannot find //logon or //saveRegistration
+ (ie. action
+ mappings) then do the following:</p>
+ <ol>
+ <li>Stop Default Server</li>
+ <li>Go to servlets\WEB-INF\ and edit web.xml and
+ struts_config.xml.</li>
+ <li>In the DOCTYPE declaration, change the word PUBLIC to
+ SYSTEM and
+ completely remove the line that reads "-//Sun
+ Microsystems, Inc.//DTD Web
+ Application 2.2//EN" from web.xml and remove
+ "-//Apache Software
+ Foundation//DTD Struts Configuration 1.0//EN" from
+ struts-config.xml.</li>
+ <li>Save these changes and go back to step 10 above.</li>
+ </ol>
+ <p>Just as a troubleshooting guide -</p>
+ <p>If you are getting errors like "Cannot find ActionMappings,
+ etc..." or
+ "Cannot find key org.apache.struts.MESSAGE" then your
+ application is most
+ likely still bombing on the struts-config issue that
+ Richard discovered.
+ The above steps SHOULD correct that leaving nothing out.
+ If you are getting
+ 404 errors about //logon or something not found, then you
+ are still having
+ XML config troubles and it is not initializing the Action
+ servlet properly.
+ Follow the steps above in regards to DTD's and it should
+ work.</p>
+ <p>As a final thought, I obviously haven't gotten to test too
+ much but I don't
+ believe that there are ANY coding changes that need to be
+ made to the actual
+ struts source. Everything about getting it to work in
+ WebSphere has been a
+ WebSphere configuration issue thus far (and I don't think
+ I'll be having any
+ more).</p>
+ <p>If changing the DTD's to SYSTEM, do so ONLY AFTER using the
+ Convert a War
+ util. Ant doesn't seem to like it the other way! :)</p>
+ <hr/>
+ <p>Back to
+ <a href="installation.html#Containers">Installation</a>
+ </p>
+ </subsection>
+ </section>
+ </body>
</document>
Modified: struts/action/trunk/xdocs/userGuide/installation-was352.xml
URL: http://svn.apache.org/viewcvs/struts/action/trunk/xdocs/userGuide/installation-was352.xml?rev=370938&r1=370937&r2=370938&view=diff
==============================================================================
--- struts/action/trunk/xdocs/userGuide/installation-was352.xml (original)
+++ struts/action/trunk/xdocs/userGuide/installation-was352.xml Fri Jan 20 16:19:02 2006
@@ -1,119 +1,204 @@
<?xml version="1.0"?>
<document url="installation-was352.html">
- <properties>
- <title>The Struts Framework Project - Installation - WebSphere 3.5.2</title>
- </properties>
-
- <body>
-<section name="6.2 Installation" href="installation">
-<subsection name="Installing Struts with your servlet container" href="Containers">
-
-<h4 id="was352">WebSphere Application Server 3.5 FixPack 2</h4>
-
-<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/>
- <p>Back to <a href="installation.html#Containers">Installation</a></p>
-</subsection>
-</section>
-</body>
+ <properties>
+ <title>The Struts Framework Project - Installation - WebSphere
+ 3.5.2</title>
+ </properties>
+
+ <body>
+ <section name="6.2 Installation" href="installation">
+ <subsection name="Installing Struts with your servlet container"
+ href="Containers">
+
+ <h4 id="was352">WebSphere Application Server 3.5 FixPack
+ 2</h4>
+
+ <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/>
+ <p>Back to
+ <a href="installation.html#Containers">Installation</a>
+ </p>
+ </subsection>
+ </section>
+ </body>
</document>
Modified: struts/action/trunk/xdocs/userGuide/installation-wls5.xml
URL: http://svn.apache.org/viewcvs/struts/action/trunk/xdocs/userGuide/installation-wls5.xml?rev=370938&r1=370937&r2=370938&view=diff
==============================================================================
--- struts/action/trunk/xdocs/userGuide/installation-wls5.xml (original)
+++ struts/action/trunk/xdocs/userGuide/installation-wls5.xml Fri Jan 20 16:19:02 2006
@@ -1,118 +1,209 @@
<?xml version="1.0"?>
<document url="installation-wls5.html">
- <properties>
- <title>The Struts Framework Project - Installation - Weblogic 5.1 sp8</title>
- </properties>
-
- <body>
-<section name="6.2 Installation" href="installation">
-<subsection name="Installing Struts with your servlet container" href="Containers">
-
-<h4 id="wls5">Weblogic 5.1 (service pack 8)</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>
- <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/>
- <p>Back to <a href="installation.html#Containers">Installation</a></p>
-</subsection>
-</section>
-</body>
+ <properties>
+ <title>The Struts Framework Project - Installation - Weblogic 5.1
+ sp8</title>
+ </properties>
+
+ <body>
+ <section name="6.2 Installation" href="installation">
+ <subsection name="Installing Struts with your servlet container"
+ href="Containers">
+
+ <h4 id="wls5">Weblogic 5.1 (service pack 8)</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>
+ <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/>
+ <p>Back to
+ <a href="installation.html#Containers">Installation</a>
+ </p>
+ </subsection>
+ </section>
+ </body>
</document>
Modified: struts/action/trunk/xdocs/userGuide/installation.xml
URL: http://svn.apache.org/viewcvs/struts/action/trunk/xdocs/userGuide/installation.xml?rev=370938&r1=370937&r2=370938&view=diff
==============================================================================
--- struts/action/trunk/xdocs/userGuide/installation.xml (original)
+++ struts/action/trunk/xdocs/userGuide/installation.xml Fri Jan 20 16:19:02 2006
@@ -18,199 +18,356 @@
-->
<document>
- <properties>
- <title>Installation</title>
- </properties>
-
- <body>
- <section name="6.2 Installation" href="installation">
- <subsection name="Prerequisite Software" href="Prerequisites">
-
- <p>The framework's binary distribution needs three other software packages installed to
- operate. You may already have these installed on your system. To build the framework from
- source you may need to acquire and install several others. The complete list is as
- follows:</p>
-
- <ul>
- <li><strong>Java Development Kit</strong> - You <strong>must</strong> download and install
- a Java2 (version 1.2 or later) Java Development Kit implementation for
- your operating system platform.
- A good starting point for locating Java Development Kit distributions is
- <a href="http://java.sun.com/j2se">http://java.sun.com/j2se</a>.
- To build the framework, Java 1.4.2 (the latest production JDK) is suggested and
- required if you use our Maven build system. </li>
-
- <li><strong>Servlet Container</strong> - You <strong>must</strong> download and install a
- servlet container that is compatible with the Servlet API Specification,
- version 2.3 or later, and the JavaServer Pages (JSP) Specification,
- version 1.2 or later. One popular choice is to download Apache's
- <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>, but any compliant
- container should work well with the framework.</li>
-
- <li><strong>XML Parser</strong> - The framework <strong>requires</strong> the presence of an XML
- parser that is compatible with the Java API for XML Parsing (JAXP)
- specification, 1.1 or later. This is bundled with J2SE 1.4 and later.
- For earlier versions of Java, the easiest way to obtain JAXP is
- probably by downloading the Web Services Developers Kit
- (1.1 or later!). See the <a href="http://java.sun.com/xml/jaxp/faq.html#jaxp-ri-latest">
- Sun JAXP FAQ</a> for more information.)
- In your applications, you may replace the reference
- implementation classes with any other JAXP compliant parser, such as
- <a href="http://xml.apache.org/xerces-j">Xerces</a>. See detailed
- instructions related to the parser in the instructions for
- <a href="#Building">building</a> and <a href="#Installing">installing</a>
- the framework, below.</li>
-
- <li><strong>Maven Build System</strong> - If you are building the framework from the
- source distribution, you must download and install the
- <a href="http://maven.apache.org/maven-1.x/">Apache Maven 1.0.2</a> build system.
- </li>
-
- </ul>
-
- </subsection>
-
- <subsection name="Install a Library Distribution" href="Installing">
-
- <p>First, download a binary distribution of Struts Action Library by following the
- instructions <a href="http://struts.apache.org/downloads.html">here</a>. Then, make sure
- you have downloaded and installed the
- <a href="#Prerequisites">prerequisite</a> software packages described
- above.</p>
-
- <p>Unpack the Library distribution into a convenient directory.
- (If you <a href="#Building">building from the source distribution</a>,
- the result of the build will already be an unpacked binary distribution
- for you). The distribution consists of the following contents:</p>
-
- <ul>
- <li><strong>lib/*.jar</strong> - The struts-*.jars contains Java classes
- distributed by Apache Struts. The other JAR files contain packages
- from other projects that are imported by Struts subprojects. When you launch
- a your application, these JARs need to be available to your
- application, usually by copying them to the application's
- <code>WEB-INF/lib</code> directory. <br />
- <em>WARNING</em> - If you are going to be hosting multiple
- applications on the same servlet container, you will be tempted
- to place the <code>struts-action.jar</code> file into the shared repository
- supported by your container. Be advised that this may cause
- ClassNotFoundException problems unless <em>all</em> of
- your application classes are stored in the shared repository.</li>
- </ul>
-
- <p>To use Struts Action Library in your own application, you will need to follow
- these steps:</p>
- <ul>
- <li>Copy the <code>lib/*.jar</code> files from the
- Library distribution into the <code>WEB-INF/lib</code> directory of your
- web application.</li>
- <li>Modify the <code>WEB-INF/web.xml</code> file for your web application
- to include a <code><servlet></code> element to define the
- controller servlet, and a <code><servlet-mapping></code> element
- to establish which request URIs are mapped to this servlet. Use the
- <code>WEB-INF/web.xml</code> file from the Struts Mailreader application
- for a detailed example of the required syntax.</li>
- <li>Create a file <code>WEB-INF/struts-config.xml</code> that defines the
- action mappings and other characteristics of your specific application.
- You can use the <code>struts-config.xml</code> file from the Struts
- Blank application for examples of the required syntax.</li>
- <li>At the top of each JSP page that will use JSP tags,
- add line(s) declaring the JSP tag libraries used on
- this particular page, like this:</li>
- </ul>
-
-<pre><%@ taglib uri="/tags/struts-bean" prefix="bean" %>
-<%@ taglib uri="/tags/struts-html" prefix="html" %>
-<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
-</pre>
-
- <ul>
- <li>When compiling the Java classes that comprise your application, be sure
- to include the JAR files (copied earlier) on the
- CLASSPATH that is submitted to the compiler.</li>
- </ul>
-</subsection> <subsection name="Installing The Framework With Your Servlet Container" href="Containers">
-
-<p>For most containers, you need only to: </p>
-<ul>
- <li>Copy the WAR files in your Struts <code>/webapp</code> directory to your
- containers <code>webapps</code> directory. </li>
- <li>In some cases, you may need to restart your container if it is running.</li>
-</ul>
-
-<h4>Running Applications Under A Security Manager</h4>
-
-<p>Many application servers execute web applications under the control of a
-Java security manager, with restricted permissions on what classes in the web
-application can do. If you utilize form beans with mapped properties, you may
-encounter security exceptions unless you add the following permission to the
-set of permissions granted to your application's codebase:</p>
-<pre>
- permission java.lang.RuntimePermission "accessDeclaredMembers";
-</pre>
-
-<p>Consult the documentation on your application server for more information
-about how to configure additional security manager permissions.</p>
-
-<h4>Installing on Various Containers</h4>
-<ul>
- <li>Bluestone Universal Business Server 7.2 - <a href="installation-ubs72.html">Additional
- steps required.</a></li>
- <li>Borland Application Server 4.5 -No additional
- steps required.</li>
- <li>iPlanet Application Server - Service Pack 2 is recommended. Note that the database
- object in the Struts MailReader application is not compatible with this container.</li>
- <li>iPlanet Web Server - <a href="installation-ip.html">Additional steps required.</a></li>
- <li>iPortal Application Server - <a href="installation-ipas.html">Additional steps required.</a></li>
- <li>Jetty - <a href="installation-jetty.html">Additional steps required.</a></li>
- <li>JRun - <a href="installation-jr30.html">Additional steps required.</a></li>
- <li>Novell ExteNd Application Server 4.0+ -
- <a href="installation-novell.html">Additional steps required.</a></li>
- <li>Orion Application Server - <a href="installation-oas.html">Additional steps
- required.</a></li>
- <li>Resin 1.2+ "standalone" - No additional steps required.</li>
- <li>RexIP - No additional steps required.</li>
- <li>SilverStream 3.7.1 and later - <a href="installation-sas.html">Additional steps required.</a></li>
- <li>Tomcat 3.1 and prior - Not recommended. Use Tomcat 3.2.1 or later.</li>
- <li>Tomcat 3.2.1 with Apache - <a href="installation-tc.html">Additional steps
- required.</a></li>
- <li>Tomcat 3.2.1+ "standalone" - No additional steps required.</li>
- <li>Tomcat 4.0 - No additional steps required.</li>
- <li>Trifork Enterprise Application Server 3.3.x - No additional steps required.</li>
- <li>Weblogic 5.1 sp8 - <a href="installation-wls5.html">Additional steps required.</a></li>
- <li>WebLogic 6.0+ - No additional steps required.</li>
- <li>WebSphere - <a href="installation-was352.html">Additional steps required.</a></li>
- <li>WebSphere - <a href="installation-was352-x.html">Steps for the Example Application.</a></li></ul>
-</subsection>
-
-<subsection name="Building From Source" href="Building">
-
- <p>
- First, download a source distribution of a Struts subproject by following the
- instructions <a href="http://struts.apache.org/downloads.html">here</a>. Then, make sure
- you have downloaded and installed <a href="http://maven.apache.org/maven-1.x/">Apache Maven 1.0.2</a>
- </p>
-
- <p>
- Change to the subproject you would like to build, and invoke
- </p>
-
- <source>maven build</source>
-
- <p>
- Go to the \build directory and run the command
- </p>
-
- <source>$maven build-all</source>
-
- </subsection>
-
-<subsection>
- <p class="right">
- Next: <a href="../faqs/index.html">FAQs and HowTos</a>
- </p>
-</subsection>
+ <properties>
+ <title>Installation</title>
+ </properties>
+
+ <body>
+ <section name="6.2 Installation" href="installation">
+ <subsection name="Prerequisite Software" href="Prerequisites">
+
+ <p>The framework's binary distribution needs three other
+ software packages installed to
+ operate. You may already have these installed on your
+ system. To build the framework from
+ source you may need to acquire and install several others.
+ The complete list is as
+ follows:</p>
+
+ <ul>
+ <li>
+ <strong>Java Development Kit</strong>
+ - You
+ <strong>must</strong>
+ download and install
+ a Java2 (version 1.2 or later) Java Development Kit
+ implementation for
+ your operating system platform.
+ A good starting point for locating Java Development
+ Kit distributions is
+ <a href="http://java.sun.com/j2se">
+ http://java.sun.com/j2se</a>
+ .
+ To build the framework, Java 1.4.2 (the latest
+ production JDK) is suggested and
+ required if you use our Maven build system.
+ </li>
+
+ <li>
+ <strong>Servlet Container</strong>
+ - You
+ <strong>must</strong>
+ download and install a
+ servlet container that is compatible with the Servlet
+ API Specification,
+ version 2.3 or later, and the JavaServer Pages (JSP)
+ Specification,
+ version 1.2 or later. One popular choice is to
+ download Apache's
+ <a href="http://jakarta.apache.org/tomcat/">Tomcat</a>
+ , but any compliant
+ container should work well with the framework.
+ </li>
+
+ <li>
+ <strong>XML Parser</strong>
+ - The framework
+ <strong>requires</strong>
+ the presence of an XML
+ parser that is compatible with the Java API for XML
+ Parsing (JAXP)
+ specification, 1.1 or later. This is bundled with J2SE
+ 1.4 and later.
+ For earlier versions of Java, the easiest way to
+ obtain JAXP is
+ probably by downloading the Web Services Developers
+ Kit
+ (1.1 or later!). See the
+ <a href="http://java.sun.com/xml/jaxp/faq.html#jaxp-ri-latest">
+ Sun JAXP FAQ</a>
+ for more information.)
+ In your applications, you may replace the reference
+ implementation classes with any other JAXP compliant
+ parser, such as
+ <a href="http://xml.apache.org/xerces-j">Xerces</a>
+ . See detailed
+ instructions related to the parser in the instructions
+ for
+ <a href="#Building">building</a>
+ and
+ <a href="#Installing">installing</a>
+ the framework, below.
+ </li>
+
+ <li>
+ <strong>Maven Build System</strong>
+ - If you are building the framework from the
+ source distribution, you must download and install the
+ <a href="http://maven.apache.org/maven-1.x/">Apache
+ Maven 1.0.2</a>
+ build system.
+ </li>
+
+ </ul>
+
+ </subsection>
+
+ <subsection name="Install a Library Distribution"
+ href="Installing">
+
+ <p>First, download a binary distribution of Struts Action
+ Library by following the
+ instructions
+ <a href="http://struts.apache.org/downloads.html">here</a>
+ . Then, make sure
+ you have downloaded and installed the
+ <a href="#Prerequisites">prerequisite</a>
+ software packages described
+ above.
+ </p>
+
+ <p>Unpack the Library distribution into a convenient
+ directory.
+ (If you
+ <a href="#Building">building from the source
+ distribution</a>
+ ,
+ the result of the build will already be an unpacked binary
+ distribution
+ for you). The distribution consists of the following
+ contents:
+ </p>
+
+ <ul>
+ <li>
+ <strong>lib/*.jar</strong>
+ - The struts-*.jars contains Java classes
+ distributed by Apache Struts. The other JAR files
+ contain packages
+ from other projects that are imported by Struts
+ subprojects. When you launch
+ a your application, these JARs need to be available to
+ your
+ application, usually by copying them to the
+ application's
+ <code>WEB-INF/lib</code>
+ directory.
+ <br/>
+ <em>WARNING</em>
+ - If you are going to be hosting multiple
+ applications on the same servlet container, you will
+ be tempted
+ to place the
+ <code>struts-action.jar</code>
+ file into the shared repository
+ supported by your container. Be advised that this may
+ cause
+ ClassNotFoundException problems unless
+ <em>all</em>
+ of
+ your application classes are stored in the shared
+ repository.
+ </li>
+ </ul>
+
+ <p>To use Struts Action Library in your own application, you
+ will need to follow
+ these steps:</p>
+ <ul>
+ <li>Copy the
+ <code>lib/*.jar</code>
+ files from the
+ Library distribution into the
+ <code>WEB-INF/lib</code>
+ directory of your
+ web application.
+ </li>
+ <li>Modify the
+ <code>WEB-INF/web.xml</code>
+ file for your web application
+ to include a
+ <code><servlet></code>
+ element to define the
+ controller servlet, and a
+ <code><servlet-mapping></code>
+ element
+ to establish which request URIs are mapped to this
+ servlet. Use the
+ <code>WEB-INF/web.xml</code>
+ file from the Struts Mailreader application
+ for a detailed example of the required syntax.
+ </li>
+ <li>Create a file
+ <code>WEB-INF/struts-config.xml</code>
+ that defines the
+ action mappings and other characteristics of your
+ specific application.
+ You can use the
+ <code>struts-config.xml</code>
+ file from the Struts
+ Blank application for examples of the required syntax.
+ </li>
+ <li>At the top of each JSP page that will use JSP tags,
+ add line(s) declaring the JSP tag libraries used on
+ this particular page, like this:</li>
+ </ul>
+
+ <pre><%@ taglib uri="/tags/struts-bean" prefix="bean" %>
+ <%@ taglib uri="/tags/struts-html" prefix="html" %>
+ <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
+ </pre>
+
+ <ul>
+ <li>When compiling the Java classes that comprise your
+ application, be sure
+ to include the JAR files (copied earlier) on the
+ CLASSPATH that is submitted to the compiler.</li>
+ </ul>
+ </subsection>
+ <subsection
+ name="Installing The Framework With Your Servlet Container"
+ href="Containers">
+
+ <p>For most containers, you need only to:</p>
+ <ul>
+ <li>Copy the WAR files in your Struts
+ <code>/webapp</code>
+ directory to your
+ containers
+ <code>webapps</code>
+ directory.
+ </li>
+ <li>In some cases, you may need to restart your container
+ if it is running.</li>
+ </ul>
+
+ <h4>Running Applications Under A Security Manager</h4>
+
+ <p>Many application servers execute web applications under the
+ control of a
+ Java security manager, with restricted permissions on what
+ classes in the web
+ application can do. If you utilize form beans with mapped
+ properties, you may
+ encounter security exceptions unless you add the following
+ permission to the
+ set of permissions granted to your application's
+ codebase:</p>
+ <pre>
+ permission java.lang.RuntimePermission
+ "accessDeclaredMembers";
+ </pre>
+
+ <p>Consult the documentation on your application server for
+ more information
+ about how to configure additional security manager
+ permissions.</p>
+
+ <h4>Installing on Various Containers</h4>
+ <ul>
+ <li>Bluestone Universal Business Server 7.2 -
+ <a href="installation-ubs72.html">Additional
+ steps required.</a>
+ </li>
+ <li>Borland Application Server 4.5 -No additional
+ steps required.</li>
+ <li>iPlanet Application Server - Service Pack 2 is
+ recommended. Note that the database
+ object in the Struts MailReader application is not
+ compatible with this container.</li>
+ <li>iPlanet Web Server -
+ <a href="installation-ip.html">Additional steps
+ required.</a>
+ </li>
+ <li>iPortal Application Server -
+ <a href="installation-ipas.html">Additional steps
+ required.</a>
+ </li>
+ <li>Jetty -
+ <a href="installation-jetty.html">Additional steps
+ required.</a>
+ </li>
+ <li>JRun -
+ <a href="installation-jr30.html">Additional steps
+ required.</a>
+ </li>
+ <li>Novell ExteNd Application Server 4.0+ -
+ <a href="installation-novell.html">Additional steps
+ required.</a>
+ </li>
+ <li>Orion Application Server -
+ <a href="installation-oas.html">Additional steps
+ required.</a>
+ </li>
+ <li>Resin 1.2+ "standalone" - No additional steps
+ required.</li>
+ <li>RexIP - No additional steps required.</li>
+ <li>SilverStream 3.7.1 and later -
+ <a href="installation-sas.html">Additional steps
+ required.</a>
+ </li>
+ <li>Tomcat 3.1 and prior - Not recommended. Use Tomcat
+ 3.2.1 or later.</li>
+ <li>Tomcat 3.2.1 with Apache -
+ <a href="installation-tc.html">Additional steps
+ required.</a>
+ </li>
+ <li>Tomcat 3.2.1+ "standalone" - No additional steps
+ required.</li>
+ <li>Tomcat 4.0 - No additional steps required.</li>
+ <li>Trifork Enterprise Application Server 3.3.x - No
+ additional steps required.</li>
+ <li>Weblogic 5.1 sp8 -
+ <a href="installation-wls5.html">Additional steps
+ required.</a>
+ </li>
+ <li>WebLogic 6.0+ - No additional steps required.</li>
+ <li>WebSphere -
+ <a href="installation-was352.html">Additional steps
+ required.</a>
+ </li>
+ <li>WebSphere -
+ <a href="installation-was352-x.html">Steps for the
+ Example Application.</a>
+ </li>
+ </ul>
+ </subsection>
+
+ <subsection name="Building From Source" href="Building">
+
+ <p>
+ First, download a source distribution of a Struts
+ subproject by following the
+ instructions
+ <a href="http://struts.apache.org/downloads.html">here</a>
+ . Then, make sure
+ you have downloaded and installed
+ <a href="http://maven.apache.org/maven-1.x/">Apache Maven
+ 1.0.2</a>
+ </p>
+
+ <p>
+ Change to the subproject you would like to build, and
+ invoke
+ </p>
+
+ <source>maven build</source>
+
+ <p>
+ Go to the \build directory and run the command
+ </p>
+
+ <source>$maven build-all</source>
+
+ </subsection>
+
+ <subsection>
+ <p class="right">
+ Next:
+ <a href="../faqs/index.html">FAQs and HowTos</a>
+ </p>
+ </subsection>
- </section>
-</body>
+ </section>
+ </body>
</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org