
Understand the course purpose: modernize legacy Struts apps and bridge gaps for developers to Spring Boot, REST APIs, microservices, and front-end frameworks like Angular, React, and Vue, starting with Maven.
Empower learners eager to dive into Java web development to harness the Struts framework, from beginners to seasoned developers, to initiate and manage robust web projects.
You can download the source code for this course at here.
Start with no prerequisites and explore Java web development with Struts2. Build on Java programming and object-oriented concepts, plus basic HTML/CSS and IDE familiarity to accelerate learning.
Learn how to install OpenJDK on Windows using the Microsoft build, choose between MSI and zip, and locate the JDK in c:\program files\microsoft\jdk for a simple setup.
Install Apache Maven on Windows by downloading, unzipping, and setting the Java home environment variable, then choose the latest or a stable version such as 3.84.
Install Visual Studio Code on Windows by downloading the appropriate installer, running the executable, and following straightforward steps to prep your environment for Java Maven development.
Explore essential Visual Studio Code extensions for Java development, including Microsoft's Java extensions, the Java debugger, Red Hat tools, Maven for Java, extension pack for Java, and testing tools.
Create the basic app using a batch file to generate the project structure, including web.xml, index.jsp, and pom.xml for Maven.
Add the Jetty plugin to enable a web server for your Java project. Verify a compatible version, avoiding 11, and follow the steps in the plugin form.
Update the index.jsp in the demo project by replacing the hello world with a revised version in the source mint web app root.
Create a new JSP file named hello in the web app folder, at the same level as index.jsp, to work with the new Struts action, and conclude this step.
Verify the GSP by running the batch file, install dependencies, start Jetty, and open the browser to port 1880 to confirm the index and hello GSP render.
Add the Struts dependency to your Java project by selecting the latest version and adding it to your dependencies, noting that other versions may cause issues.
Add log4j to your Struts project to enable logs and troubleshoot effectively. Create a resource folder, add log4j core and api dependencies, and follow standard project setup and version consistency.
Learn the best practice of updating the pom.xml by adjusting the properties section, replacing three lines with recommended versions, and saving the file.
Add struts.xml in the source resource folder to define the index and hello actions for the JSP result within the Struts MVC framework, with demo setup and production changes noted.
Create a Java action by adding a new folder and file, importing action support, and extending the action support, then return success.
Run the Struts app with Jetty, verify by visiting localhost to see hello and hello.action work, confirming the project configuration and Java setup.
Download Apache Tomcat 9 from the official site and avoid Tomcat 10, then install, configure, deploy your web app, and run it on Tomcat.
Download and install Tomcat by extracting the zip with 7-Zip or WinZip on a Windows machine. Configure a few settings, with the next video showing the details.
Package the web app as a war file with Maven (mvn clean install compile package), find the war in the target folder, and deploy to Tomcat to view results.
Launch Tomcat by running the start batch file in the bin folder, log in with admin and password to view the manager page, and confirm Tomcat started properly.
Run the Struts app on Tomcat, verify hello words, hello dot action, and index JSP to complete the basic Struts cycle and prepare for more complex apps.
Create a basic struts app starting from hello world, build the project structure, update pom.xml with dependencies, and add log4j2.xml and web.xml.
Create the model class and its file in src/main, organizing the package as shown. Copy the source code and build a very simple model.
Create the hello world action class in a dedicated action folder, establishing the core Struts action setup and preparing the project for subsequent steps.
Create a hello world JSP in the main web app folder by copying the existing index.jsp, then configure it to use the taglib and the message property.
Create the URL action for the index.jsp page, update the body message, and add a link configured as a URL action.
Run the app with jetty by executing mvn run, troubleshoot a path issue in VS Code, and confirm the localhost address loads the Hello World app and the helloaction responds.
Add the URL tag with parameters in the index.jsp, locate it, add the tag here, then run it with Jetty to see the changes.
Apply the Struts 2 form tag by adding new code to the index jsp and verify the result in the next step.
Run the app with Jetty, verify results at a different url, click the new form, review the code, and confirm it works.
Learn to use the Struts 2 property tag by updating the action with a hello count property, incrementing it in execute, and reflecting it in the hello world JSP.
Run the app with jetty to view the added property tag, reload the index, and confirm the property works as the counters display two, three, and four hits.
Update two java files, the message store and the hello world action, adding set message functionality and concatenating the username when setting messages, then run to observe the results.
Add a new person model with getters, setters, and toString method, following naming conventions. Use string fields for simplicity and plan validation, view and action steps in Visual Studio Code.
Create a register jsp view in the web app folder with a form for first name, last name, email, and age to register online and link to the backend database.
Add a new action controller by extending action support, validate the person age, handle errors, and wire three view jsps for invalid, success, and error results.
Create three new view jsp pages for the three Struts action results—success, invalid, and arrow—then map these views in the Struts XML to complete the step.
Create an action mapping by registering the Java class and following the standard three-part action structure, then add a homepage link.
Create a link from the home page index.jsp to the new view jsp, add a register.jsp link, and test the navigation.
Run and test the app by loading the register.jsp form, entering first name, last name, email, and age, then observe validation messages and a successful registration.
Launch the new Struts app section and implement form validation by creating the basic app, then renaming and updating it to zero six.
Refactor the model by changing the tag from string to int and remove the old age validation, preparing for a new validation approach to be shown in the next video.
Update the action to include the input by trusting the XML, keep the built-in input unchanged, remove the invalid element, and note that optional CSS styling follows.
Shows how to style Struts2 error messages by registering a JSP and placing it in the header, then run and test the app to verify the error page styling.
Run and test the app by launching a run batch, opening a browser, and submitting the form to observe required field validation for first name, email, and age.
Create the basic Struts app by duplicating the previous project, fix the pom file, and start with the five small steps of the action level properties in resource files section.
Learn to configure action level properties in Struts by adding a register.properties in the resource folder, updating jsp keys, adjusting links and Struts.xml, and restarting the server.
Update the result.jsp to use the dynamic text tag, drive output from a property file, and display a personalized message on the last successful result page using first name.
Learn how package level property files share values across actions in the same Java package. Use the full name and folder location to access the greeting value.
Explore global properties that apply across all packages, configure them in the top level resources and XML, and verify with hello world and index.
Learn how to implement i18n in a Struts project by adding language-specific properties files for English, Spanish, and French, registering resources, and testing multilingual pages.
In the dynamic world of technology, it's 2023, and while some frameworks come and go, Struts remains a trusted workhorse in the realm of web development. Large organizations, including governments, still rely on legacy Struts applications to power critical operations. However, the winds of change are blowing, and these organizations are keen to reduce tech debt and stay in step with modern trends.
If you're a relatively new entrant to the world of Java programming and have already embraced the likes of Spring Boot and Angular, you're in a unique position to assist in the transition from Struts to these more contemporary technologies. The challenge? You might not have hands-on experience with Struts. That's where our course comes into play.
Designed with beginners in mind, "Struts Savvy: Quickstart Your Java Projects" is your indispensable guide to bridging the gap. Whether you're tasked with replacing aging Struts applications or maintaining and enhancing them, this course equips you with the essential Struts knowledge you need.
What You'll Gain:
Understand Struts 2 from the ground up, ensuring a smooth transition.
Master Struts 2 concepts, actions, interceptors, and more.
Learn to optimize, streamline, and modernize legacy applications.
Seamlessly integrate your Spring Boot and Angular expertise with Struts.
Join us on this transformative journey, and become the go-to professional who can breathe new life into old systems and drive the adoption of modern technology, all while saving time, resources, and headaches. With "Struts Savvy," you'll be the tech trendsetter that organizations are seeking in 2023 and beyond.