### Access Struts Example Application on WebLogic Source: https://weblegacy.github.io/struts1/userGuide/installation-wls5 This snippet demonstrates the URL format to access a deployed Struts application, specifically the example application, running on a WebLogic server. ```http http://localhost:7001/strutsexample ``` -------------------------------- ### Start WebLogic with Updated Classpath (Unpacked) Source: https://weblegacy.github.io/struts1/userGuide/installation-wls5 This Java command example illustrates how to start the WebLogic server with an updated classpath that includes necessary Struts JARs and classes for deploying unpacked web applications. ```bash c:\jdk1.3\bin\java -ms16m -mx64m -classpath c:\weblogic\lib\weblogic510sp8boot.jar; ``` -------------------------------- ### Struts 1 JRun Deployment URL Example Source: https://weblegacy.github.io/struts1/userGuide/installation-jr30 This snippet shows the URL used to test the Struts 1 example application after successful deployment on a JRun server. It assumes the application is deployed with the context path '/struts-example'. ```html http://hostname/struts-example/index.jsp ``` -------------------------------- ### WebSphere Installation Steps for Struts 1 Source: https://weblegacy.github.io/struts1/userGuide/installation-was352-x This section details the process of installing the Struts 1 example application on WebSphere Application Server 3.5. It involves using the Convert War file task, copying configuration files, and setting the default error page. ```text 1. Start up the adminserver. 2. Start up Admin Console. 3. Use the Convert War file task to convert the struts-example.war from the struts-b1 distrib as-is. 4. Convert to the default_server, default servlet engine and standard install directory (c:\websphere\appserver\hosts\default_host). 5. 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). 6. 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. 7. 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). 8. 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. 9. Down where it says Default Error Page, enter /ErrorReporter and then click Apply. 10. 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. 11. Via a browser accessed the app using http://localhost/struts-example/index.jsp. 12. If it returns "Application not Available" then go back to the Admin Console, right-click on struts-example and select Restart WebApp. 13. Once it reports success, go back to the URL above and try again - it should work flawlessly. ``` -------------------------------- ### Configure application.xml for Struts Example Source: https://weblegacy.github.io/struts1/userGuide/installation-ipas This snippet shows the modification required for the application.xml file to set the display name for the Struts Example application. This is a crucial step in the deployment process. ```XML Struts Example ....... ``` -------------------------------- ### Configure cc.xml for Struts Example Context Root Source: https://weblegacy.github.io/struts1/userGuide/installation-ipas This snippet demonstrates how to update the cc.xml file to define the context root for the Struts example web application. This configuration is essential for accessing the application correctly. ```XML struts-example ``` -------------------------------- ### Struts Example WAR Deployment Plan Source: https://weblegacy.github.io/struts1/userGuide/installation-novell This XML snippet defines the deployment plan for the 'struts-example.war' file when deploying to a SilverStream application server. It specifies the WAR file name and the URL context for the application. ```XML struts-example.war true struts-example ``` -------------------------------- ### Configure WebLogic for Struts Example Application (WAR) Source: https://weblegacy.github.io/struts1/userGuide/installation-wls5 This configuration snippet shows how to add an entry to the weblogic.properties file to make the Struts example application, packaged as a WAR file, available through the WebLogic server. ```properties weblogic.httpd.webApp.strutsexample= c:/jakarta-struts/webapps/struts-example.war ``` -------------------------------- ### Access Struts 1 Applications on Orion Source: https://weblegacy.github.io/struts1/userGuide/installation-oas These are the default URLs to access the Struts 1 documentation and example applications after they have been configured and deployed on the Orion Application Server, assuming the default port 80. ```HTTP http://localhost/struts-documentation http://localhost/struts-example ``` -------------------------------- ### Manually Copy Resource File for Struts Application Source: https://weblegacy.github.io/struts1/userGuide/installation-wls5 This example shows the directory path where the ApplicationResources.properties file needs to be manually copied for the Struts example application when deployed on WebLogic, to resolve runtime errors. ```bash c:\jakarta-struts\webapps\WEB-INF\_tmp_war_strutsexample ``` -------------------------------- ### Configure WebLogic for Struts Example Application (Unpacked) Source: https://weblegacy.github.io/struts1/userGuide/installation-wls5 This configuration snippet shows how to update weblogic.properties for an unpacked Struts example application, specifying its directory path for deployment on WebLogic. ```properties weblogic.httpd.webApp.strutsexample= c:/jakarta-struts/webapps/struts-example/ ``` -------------------------------- ### Configure Orion Website for Struts 1 Applications Source: https://weblegacy.github.io/struts1/userGuide/installation-oas This snippet demonstrates how to map web applications to specific root contexts in Orion's default-web-site.xml. It associates the Struts documentation and example applications with their respective URLs. ```XML ``` -------------------------------- ### Workaround for Struts Example Application Bug in Orion Source: https://weblegacy.github.io/struts1/userGuide/installation-oas This section details steps to resolve a bug in Orion versions prior to 1.0.3 that affects the Struts example application. It involves copying a configuration file and modifying the web.xml for the action servlet. ```XML Modify the $STRUTS_HOME/webapps/struts-example/WEB-INF/web.xm file, changing the value of the "config" initialization parameter (for the action servlet) from /WEB-INF/struts-config.xml to /action.xml . ``` -------------------------------- ### Deploy WAR with SilverCmd Source: https://weblegacy.github.io/struts1/userGuide/installation-novell This snippet shows how to deploy Struts WAR files to a SilverStream application server using the SilverCmd utility. It includes commands for deploying both the example and documentation WARs, specifying the server, database, WAR file, and deployment plan. ```Shell SilverCmd DeployWar localhost Silvermaster struts-example.war -f struts-example-depl-plan.xml SilverCmd DeployWar localhost Silvermaster struts-documentation.war -f struts-documentation-depl-plan.xml ``` -------------------------------- ### Struts 1 Example Application: struts-blank Source: https://weblegacy.github.io/struts1/userGuide/release-notes-1_0-b1 Includes a new example application named `struts-blank`, which serves as a quick starting point for new application development using the Struts framework. ```Java // struts-blank example application public class BlankAction { // ... } ``` -------------------------------- ### Struts 1 Configuration Troubleshooting Source: https://weblegacy.github.io/struts1/userGuide/installation-was352-x This guide provides troubleshooting steps for common Struts 1 errors encountered during WebSphere installation, such as 'Cannot find ActionMappings' or 'Cannot find key org.apache.struts.MESSAGE'. It emphasizes checking the struts-config.xml and DTD references. ```text 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. ``` -------------------------------- ### Deploy struts-example.war on SilverStream Source: https://weblegacy.github.io/struts1/userGuide/installation-sas This XML deployment plan configures the 'struts-example.war' for deployment on SilverStream Application Server. It specifies the WAR file name and enables its deployment with a defined URL. ```XML struts-example.war true struts-example ``` -------------------------------- ### Struts Example Compilation Error Source: https://weblegacy.github.io/struts1/userGuide/installation-ipas This snippet shows a typical compilation error encountered when running the Struts Example Application on iPortal Application Server 1.3 due to JSP compliance issues. The error indicates a problem with setting the 'locale' attribute in the HtmlTag. ```Java /struts-example/index.jsp: Compilation failed [IT_Builder:1000] at com.iona.j2ee.builder.JavaBuilder.build(JavaBuilder.java:84) at com.iona.j2ee.builder.JspBuilder.build(JspBuilder.java:51) at com.iona.j2ee.builder.WarBuilder.build(WarBuilder.java:111) at com.iona.j2ee.builder.EarBuilder.build(EarBuilder.java:99) at com.iona.j2ee.builder.EarBuilder.main(EarBuilder.java:223) at iportal.build.main(build.java:14) ocale(boolean) in org.apache.struts.taglib.html.HtmlTag cannot be applied to (java.lang.String) _x0.setLocale("true"); ^ 1 error ``` -------------------------------- ### Patching index.jsp and logon.jsp Source: https://weblegacy.github.io/struts1/userGuide/installation-ipas This code snippet illustrates a required modification for the index.jsp and logon.jsp files to ensure the Struts Example Application runs correctly under iPAS 1.3. It involves changing the locale attribute. ```JSP Change to ``` -------------------------------- ### Configure Apache for Struts 1 Applications Source: https://weblegacy.github.io/struts1/userGuide/installation-tc This Apache configuration block sets up aliases and servlet mounts for Struts 1 web applications (documentation and example) within Tomcat. It defines access controls for the WEB-INF directory and specifies options for directory indexing. ```apache Alias /struts-documentation "$TOMCAT_HOME/webapps/struts-documentation" Options Indexes FollowSymLinks ApJServMount /struts-documentation/servlet /struts-documentation AllowOverride None deny from all Alias /struts-example "$TOMCAT_HOME/webapps/struts-example" Options Indexes FollowSymLinks ApJServMount /struts-example/servlet /struts-example AllowOverride None deny from all ``` -------------------------------- ### Fix User's Guide Example Reference in Struts 1 Documentation Source: https://weblegacy.github.io/struts1/userGuide/release-notes-1_0-b3 Corrects a reference to an outdated Struts 0.5 tag within one of the examples in the Struts 1 User's Guide. ```Markdown Example showing usage of `` tag. ``` -------------------------------- ### WebSphere Configuration Note for Struts 1 Source: https://weblegacy.github.io/struts1/userGuide/installation-was352-x A note regarding Struts 1 installation on WebSphere, indicating that issues are typically configuration-related rather than requiring code changes to the Struts source. It also advises on the order of applying DTD changes with Ant. ```text 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). 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! :) ``` -------------------------------- ### Deploy struts-documentation.war on SilverStream Source: https://weblegacy.github.io/struts1/userGuide/installation-sas This XML deployment plan is used to deploy the 'struts-documentation.war' file on SilverStream Application Server. It includes the WAR file name and sets it to be enabled for deployment. ```XML struts-documentation.war true struts-documentation ``` -------------------------------- ### Include Tomcat Configuration in Apache Source: https://weblegacy.github.io/struts1/userGuide/installation-tc This line in Apache's httpd.conf file includes the Tomcat-specific configuration, ensuring that Apache can properly serve Tomcat applications and handle their requests. ```apache Include /usr/local/apache/conf/tomcat-apache.conf ``` -------------------------------- ### Struts Framework Installation Source: https://weblegacy.github.io/struts1/faqs/kickstart This section would typically detail the steps and requirements for installing the Struts framework, including any necessary dependencies or configuration steps. ```text The process for installing Struts typically involves downloading the framework's JAR files and ensuring they are included in your project's classpath. Specific steps may vary depending on your development environment and build tools. ``` -------------------------------- ### Patch JSP Files for Struts Example Application on JRun Source: https://weblegacy.github.io/struts1/userGuide/installation-jr30 This snippet outlines the specific modifications needed for JSP files within the Struts Example Application to run on JRun. It includes changing attribute syntax for boolean values. ```html > ``` ```html > ``` ```html filter="true" filter=<%= true %> ``` -------------------------------- ### Build Mailreader Example Application with Maven Source: https://weblegacy.github.io/struts1/struts-scripting/source-guide This command builds the Mailreader example application, which uses Groovy scripts for Struts Actions. After changing to the application's directory, running 'mvn install' creates a WAR file in the `/apps/scripting-mailreader/target/` directory. ```bash mvn install ``` -------------------------------- ### Struts 1 JRun Compilation Error Example Source: https://weblegacy.github.io/struts1/userGuide/installation-jr30 This snippet demonstrates a typical compilation error encountered when running Struts example applications on JRun due to its partial compliance with JSP specifications. It highlights the specific error message related to method matching for parameter conversion. ```text /struts-example/index.jsp: javax.servlet.ServletException: Compilation error occurred: 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)". ``` -------------------------------- ### Tiles Definition File Syntax Example Source: https://weblegacy.github.io/struts1/apidocs/org/apache/struts/tiles/package-summary This XML snippet illustrates the syntax for a Tiles definition file, including the DOCTYPE declaration and example definitions for a site's main layout and an index page, demonstrating inheritance. ```XML ``` -------------------------------- ### Struts Documentation WAR Deployment Plan Source: https://weblegacy.github.io/struts1/userGuide/installation-novell This XML snippet defines the deployment plan for the 'struts-documentation.war' file when deploying to a SilverStream application server. It specifies the WAR file name and the URL context for the documentation application. ```XML struts-documentation.war true struts-documentation ``` -------------------------------- ### Patching registration.jsp and subscription.jsp Source: https://weblegacy.github.io/struts1/userGuide/installation-ipas This code snippet shows a necessary change for registration.jsp and subscription.jsp files to make the Struts Example Application compatible with iPAS 1.3. It involves updating the filter attribute. ```JSP Change all instances of filter="true" to filter=<%= true %> ``` -------------------------------- ### Struts Tiles: Multi-channel Support Example Source: https://weblegacy.github.io/struts1/struts-tiles2/index This example shows how Struts Tiles can load different definitions based on a key, such as user privileges or browser type. This multi-channel support allows for dynamic content delivery tailored to specific contexts. ```XML ``` -------------------------------- ### Struts 1 Web Application Deployment Descriptor Example Source: https://weblegacy.github.io/struts1/userGuide/index Demonstrates key configurations within the web.xml file for a Struts 1 application. This includes mapping the Action Servlet and defining its servlet name and URL patterns. ```xml action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml 1 action *.do index.jsp ``` -------------------------------- ### Struts Examples Dependency Source: https://weblegacy.github.io/struts1/struts-tiles2/dependency-updates-report Includes a WAR file containing various examples for the Struts framework. ```xml io.github.weblegacy struts-examples 1.5.0-RC2 war ``` -------------------------------- ### Example Properties File Content Source: https://weblegacy.github.io/struts1/apidocs/org/apache/struts/util/package-summary Provides an example of the content for a French properties file used with the MessageResources implementation, defining a message key 'hi' with a French greeting. ```properties hi=Bonjour ``` -------------------------------- ### Example Properties File Content Source: https://weblegacy.github.io/struts1/struts-core/apidocs/org/apache/struts/util/package-summary Provides an example of the content for a French properties file used with the MessageResources implementation, defining a message key 'hi' with a French greeting. ```properties hi=Bonjour ``` -------------------------------- ### Get Method - MockHttpServletRequest Source: https://weblegacy.github.io/struts1/struts-core/testapidocs/index-all Returns the name of the request's HTTP method, for example, GET, POST, or PUT. ```Java getMethod() - Method in class org.apache.struts.mock.MockHttpServletRequest ``` -------------------------------- ### Tiles Definition File Syntax Example Source: https://weblegacy.github.io/struts1/struts-tiles/apidocs/org/apache/struts/tiles/package-summary Demonstrates the structure and syntax of a Tiles definition file, including DOCTYPE declaration, root element, and nested definitions with attributes like 'name', 'path', and 'extends'. Shows how to define page layouts and inherit properties. ```XML ``` -------------------------------- ### Get and Set Boolean Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Provides methods to get and set the booleanProperty. The property is initialized to false. ```Java private boolean falseProperty = false; public boolean getFalseProperty() { return (falseProperty); } public void setFalseProperty(boolean falseProperty) { this.falseProperty = falseProperty; } ``` -------------------------------- ### Struts Examples Dependency Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/dependencies This entry represents the 'struts-examples' WAR artifact, which is part of the Struts 1 project. It includes example applications demonstrating the Struts framework. ```Maven io.github.weblegacy struts-examples 1.5.0-RC2 war ``` -------------------------------- ### Get and Set Null String Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Handles a String property that can be null. Provides methods to get and set its value. ```Java private String nullProperty = null; public String getNullProperty() { return (this.nullProperty); } public void setNullProperty(String nullProperty) { this.nullProperty = nullProperty; } ``` -------------------------------- ### Get and Set Long Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Provides methods to get and set a long integer property. The property is initialized to 321. ```Java private long longProperty = 321; public long getLongProperty() { return (this.longProperty); } public void setLongProperty(long longProperty) { this.longProperty = longProperty; } ``` -------------------------------- ### Deploy Struts WAR files using SilverCmd Source: https://weblegacy.github.io/struts1/userGuide/installation-sas These commands demonstrate how to deploy Struts 1 web applications ('struts-example.war' and 'struts-documentation.war') to a SilverStream server using the 'SilverCmd DeployWAR' utility. The commands specify the server, database, WAR file, and the corresponding deployment plan. ```Shell SilverCmd DeployWar localhost Silvermaster struts-example.war -f struts-example-depl-plan.xml ``` ```Shell SilverCmd DeployWar localhost Silvermaster struts-documentation.war -f struts-documentation-depl-plan.xml ``` -------------------------------- ### Get JavaScript Start in JavascriptValidatorTag Source: https://weblegacy.github.io/struts1/struts-taglib/apidocs/index-all Returns the opening script element and initial JavaScript code. This is used to start the JavaScript validation block. ```Java getJavascriptBegin(String) - Method in class org.apache.struts.taglib.html.JavascriptValidatorTag Returns the opening script element and some initial javascript. ``` -------------------------------- ### Struts 1: struts-faces Initial Tiles Support and Example App Source: https://weblegacy.github.io/struts1/userGuide/release-notes-1_2_4 This entry describes the initial support for Tiles in struts-faces, including partial "Tilesization" of the example application. It notes that this is not production-ready but welcomes comments. ```Java // Initial support for Tiles; partial "Tilesization" of example app; *not* ready for prime time but comments definately welcome. ``` -------------------------------- ### NetBeans IDE: Setup Blank Struts Application Source: https://weblegacy.github.io/struts1/faqs/netbeans40 This section details the process of setting up a new, blank Struts application using NetBeans IDE 4.0. It includes creating a new project, selecting 'Web Application', specifying project details, adding Struts libraries (JARs) to the project's compilation sources, and copying configuration files like struts-config.xml and MessageResources.properties. ```XML Builds, tests, and runs the project BlankStrutsApp. ``` -------------------------------- ### Get and Set Single Select String in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Manages a String property for a single-selection list. Provides methods to get and set its value. The property is initialized to 'Single 5'. ```Java private String singleSelect = "Single 5"; public String getSingleSelect() { return (this.singleSelect); } public void setSingleSelect(String singleSelect) { this.singleSelect = singleSelect; } ``` -------------------------------- ### Struts Configuration Example Source: https://weblegacy.github.io/struts1/apidocs/org/apache/struts/taglib/html/package-summary An example of Struts configuration showing action mappings and form bean definitions, used to illustrate how the HTML form tag defaults its properties. ```XML < ... /> < ... /> ``` -------------------------------- ### Get and Set Integer Multibox in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Handles an array of integers, likely for a multi-select or checkbox component in Struts 1. Provides methods to get and set the entire integer array. ```Java private int intMultibox[] = new int[0]; public int[] getIntMultibox() { return (this.intMultibox); } public void setIntMultibox(int intMultibox[]) { this.intMultibox = intMultibox; } ``` -------------------------------- ### Example Tiles Definition File Syntax Source: https://weblegacy.github.io/struts1/struts-tiles2/apidocs/org/apache/struts/tiles2/package-summary This XML snippet provides an example of a Tiles definition file, showcasing the DTD declaration and the structure for defining page layouts and components. It includes a master layout definition and an example of extending it for a specific page. ```XML ``` -------------------------------- ### Get and Set Integer Multibox Array in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Manages an integer array intended for multibox selection, providing methods to get and set the array. The array is initialized as an empty array. ```Java private int intMultibox[] = new int[0]; public int[] getIntMultibox() { return (this.intMultibox); } public void setIntMultibox(int intMultibox[]) { this.intMultibox = intMultibox; } ``` -------------------------------- ### Weblegacy Struts Examples WAR Source: https://weblegacy.github.io/struts1/struts-extras/dependency-updates-report Includes a WAR file containing various Struts examples, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-examples version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get and Set Multiple Select Strings in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Manages an array of strings, typically used for a multiple-selection list in Struts 1 forms. Allows getting the selected strings or setting new ones. ```Java private String[] multipleSelect = { "Multiple 3", "Multiple 5", "Multiple 7" }; public String[] getMultipleSelect() { return (this.multipleSelect); } public void setMultipleSelect(String multipleSelect[]) { this.multipleSelect = multipleSelect; } ``` -------------------------------- ### Weblegacy Struts EL Example WAR Source: https://weblegacy.github.io/struts1/struts-extras/dependency-updates-report Includes an example WAR file demonstrating Struts EL usage, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-el-example version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get Username - Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-faces-example1/xref/org/apache/struts/webapp/example/SubscriptionForm Returns the username. This is a standard getter method for the 'username' property. ```Java /** * Return the username. */ public String getUsername() { return (this.username); } ``` -------------------------------- ### Weblegacy Struts EL Example WAR Source: https://weblegacy.github.io/struts1/struts-core/dependency-updates-report Includes an example WAR file demonstrating Struts EL usage, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-el-example version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get and Set Single Select String in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Manages a single String value, typically for a dropdown or single-selection list in Struts 1. Provides methods to get the selected string or set a new one. ```Java private String singleSelect = "Single 5"; public String getSingleSelect() { return (this.singleSelect); } public void setSingleSelect(String singleSelect) { this.singleSelect = singleSelect; } ``` -------------------------------- ### Weblegacy Struts EL Example WAR Source: https://weblegacy.github.io/struts1/struts-el/dependency-updates-report Includes an example WAR file demonstrating Struts EL usage, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-el-example version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get and Set Float Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Handles a single-precision floating-point number property. Includes methods to get the current float value and set a new one, typical for Struts 1 data binding. ```Java private float floatProperty = (float) 123.0; public float getFloatProperty() { return (this.floatProperty); } public void setFloatProperty(float floatProperty) { this.floatProperty = floatProperty; } ``` -------------------------------- ### Weblegacy Struts Examples WAR Source: https://weblegacy.github.io/struts1/struts-core/dependency-updates-report Includes a WAR file containing various Struts examples, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-examples version: 1.5.0-RC2 type: war ``` -------------------------------- ### Weblegacy Struts EL Example WAR Source: https://weblegacy.github.io/struts1/dependency-updates-report Includes an example WAR file demonstrating Struts EL usage, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-el-example version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get and Set Null String Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Manages a String property that can be null. Provides methods to get the current String value or set it to a new String or null, useful for optional fields in Struts 1. ```Java private String nullProperty = null; public String getNullProperty() { return (this.nullProperty); } public void setNullProperty(String nullProperty) { this.nullProperty = nullProperty; } ``` -------------------------------- ### Weblegacy Struts Examples WAR Source: https://weblegacy.github.io/struts1/struts-el/dependency-updates-report Includes a WAR file containing various Struts examples, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-examples version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get and Set Indexed Integer in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-examples/xref/org/apache/struts/webapp/exercise/TestBean Manages an integer array with indexed access. Allows getting or setting a specific integer value within the array using its index, useful for ordered data in Struts 1. ```Java private int intIndexed[] = { 0, 10, 20, 30, 40 }; public int getIntIndexed(int index) { return (intIndexed[index]); } public void setIntIndexed(int index, int value) { intIndexed[index] = value; } ``` -------------------------------- ### Weblegacy Struts EL Example WAR Source: https://weblegacy.github.io/struts1/struts-faces/dependency-updates-report Includes an example WAR file demonstrating Struts EL usage, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-el-example version: 1.5.0-RC2 type: war ``` -------------------------------- ### Get Nested TestBean in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Retrieves a nested TestBean object. If the object is null, it is initialized before being returned. ```Java private TestBean nested = null; public TestBean getNested() { if (nested == null) { nested = new TestBean(); } return (nested); } ``` -------------------------------- ### Get and Set Float Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Allows retrieval and modification of the floatProperty. The property is initialized to 123.0. ```Java private float floatProperty = (float) 123.0; public float getFloatProperty() { return (this.floatProperty); } public void setFloatProperty(float floatProperty) { this.floatProperty = floatProperty; } ``` -------------------------------- ### Tiles Definition File Syntax Example Source: https://weblegacy.github.io/struts1/apidocs/org/apache/struts/tiles2/package-summary This XML snippet illustrates the basic syntax for a Tiles definition file (`tiles-config_1_4.dtd`). It defines a main layout and an index page that inherits from the main layout, showcasing the use of `` and `` tags. ```XML ``` -------------------------------- ### Get Subscription Type - Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-faces-example1/xref/org/apache/struts/webapp/example/SubscriptionForm Returns the current subscription type. This is a standard getter method for the 'type' property. ```Java /** * Return the subscription type. */ public String getType() { return (this.type); } ``` -------------------------------- ### Weblegacy Struts Examples WAR Source: https://weblegacy.github.io/struts1/struts-faces/dependency-updates-report Includes a WAR file containing various Struts examples, version 1.5.0-RC2. ```Java groupId: io.github.weblegacy artifactId: struts-examples version: 1.5.0-RC2 type: war ``` -------------------------------- ### ActionServlet Initialization Source: https://weblegacy.github.io/struts1/struts-core/apidocs/org/apache/struts/action/ActionServlet Methods related to the initialization of the ActionServlet and its components, including configuration parsing, resource loading, and module setup. ```Java protected void initChain() Parse the configuration documents specified by the `chainConfig` init-param to configure the default `Catalog` that is registered in the `CatalogFactory` instance for this application. ``` ```Java protected org.apache.commons.digester.Digester initConfigDigester() Create (if needed) and return a new `Digester` instance that has been initialized to process Struts module configuration files and configure a corresponding `ModuleConfig` object (which must be pushed on to the evaluation stack before parsing begins). ``` ```Java protected void initInternal() Initialize our internal MessageResources bundle. ``` ```Java protected void initModuleActions(ModuleConfig config) Initialize the action configs for the specified module. ``` ```Java protected ModuleConfig initModuleConfig(String prefix, String paths) Initialize the module configuration information for the specified module. ``` ```Java protected void initModuleConfigFactory() Initialize the factory used to create the module configuration. ``` ```Java protected void initModuleExceptionConfigs(ModuleConfig config) Initialize the exception handlers for the specified module. ``` ```Java protected void initModuleFormBeans(ModuleConfig config) Initialize the form beans for the specified module. ``` ```Java protected void initModuleForwards(ModuleConfig config) Initialize the forwards for the specified module. ``` ```Java protected void initModuleMessageResources(ModuleConfig config) Initialize the application `MessageResources` for the specified module. ``` ```Java protected void initModulePlugIns(ModuleConfig config) Initialize the plug ins for the specified module. ``` ```Java protected void initModulePrefixes(ServletContext context) Saves a String[] of module prefixes in the ServletContext under Globals.MODULE_PREFIXES_KEY. ``` ```Java protected void initOther() Initialize other global characteristics of the controller servlet. ``` ```Java protected void initServlet() ``` -------------------------------- ### Get and Set Short Property in Java Source: https://weblegacy.github.io/struts1/struts-apps/struts-el-example/xref/org/apache/struts/webapp/el/exercise/TestBean Allows retrieval and modification of a short integer property. The property is initialized to 987. ```Java private short shortProperty = (short) 987; public short getShortProperty() { return (this.shortProperty); } public void setShortProperty(short shortProperty) { this.shortProperty = shortProperty; } ```