Struts 2 Getting-Started on Ubuntu 16.10 Yakkety Linux Easy Guide

May 9th, 2017 by thelinuxevangelist

Struts 2 Quick-Start on Ubuntu 16.10 Yakkety




Hello Ubuntu User! This Tutorial Shows You Step-by-Step How-to Install and Getting-Started with Struts 2 Hello-World Java Web Application on Ubuntu 16.10 Yakkety Yak 32/64bit GNU/Linux.

The first benefit of using Struts is that you don’t have to write a Controller and can concentrate on writing Business Logic in action classes.

Struts 2 Features List:

  • Struts provides a Filter Dispatcher, saving you writing one.
  • Struts employs an XML-based Configuration file to match URIs with actions.
  • Struts instantiates the Action Class and populates Action Properties with user inputs. If you don’t specify an action class, a default action class will be instantiated.
  • Struts Validates user input and redirects user back to the input form if validation failed. Input validation is optional and can be done programmatically or declaratively. On top of that, Struts provides Built-in Validators for most of the tasks you may encounter when building a web application.
  • Struts invokes the Action Method and you can change the method for an action through the Configuration File.
  • Struts examines the Action Result and executes the result. The most common result type, Dispatcher, forwards control to a JSP. However, Struts comes with various result types that allow you to do things differently, such as generate a PDF, redirect to an external resource, send an error message, etc.
Struts 2 Quick-Start on Ubuntu 16.10 Yakkety Linux - Featured
  1. Open a Command Line Terminal Window
    Ctrl+Alt+t on desktop
    (Press “Enter” to Execute Commands)

    Struts 2 Quick-Start on Ubuntu 16.10 Yakkety Linux - Open Terminal
  2. Download All Apache Struts 2 Release

    Get Struts2 All .zip
  3. Double-Click on Archive and Extract into Home

     - Extract Apache Struts 2
    Or from Command Line:

    unzip -d $HOME/struts2 struts-2*-all.zip
  4. Relocate Struts 2

    mv $HOME/struts2* $HOME/struts2
  5. Access the Target Directory

    cd $HOME/struts2
  6. Struts 2 Hello-World Quick-Start Example

    Find Struts 2 Hello-World

Tags: , , , , , , , , , , , , ,