Deprecated: Creation of dynamic property WPtouchProFour::$settings_object is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php on line 82

Deprecated: Automatic conversion of false to array is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/admin-load.php on line 70

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_classic_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 347

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 349

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$toolbar_block_side is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 350

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$panels_block is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 351

Deprecated: Creation of dynamic property Advanced_Editor_Tools::$used_block_buttons is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/tinymce-advanced/tinymce-advanced.php on line 354

Deprecated: Creation of dynamic property YARPP::$is_custom_template is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php on line 56

Deprecated: Creation of dynamic property YARPP::$db_options is deprecated in /home2/learnera/public_html/tech/wp-content/plugins/yet-another-related-posts-plugin/classes/YARPP_Core.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home2/learnera/public_html/tech/wp-content/plugins/wptouch/core/class-wptouch-pro.php:82) in /home2/learnera/public_html/tech/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":420,"date":"2014-05-28T10:30:30","date_gmt":"2014-05-28T10:30:30","guid":{"rendered":"http:\/\/tech.learnerandtutor.com\/?p=420"},"modified":"2014-05-28T10:30:51","modified_gmt":"2014-05-28T10:30:51","slug":"struts2-tutorial-part-4-packages","status":"publish","type":"post","link":"http:\/\/tech.learnerandtutor.com\/struts2-tutorial-part-4-packages\/","title":{"rendered":"Struts2 Tutorial Part 4 \u2013 Packages"},"content":{"rendered":"

In this tutorial session we will discuss about struts 2 packages.Struts 2 packages are like java packages where actions can be grouped together. See a sample package below.<\/p>\n

<package name=\"default\" namespace=\"\/\" extends=\"struts-default\">\r\n    <action name=\"login\">\r\n        <result>\/menu\/login.jsp<\/result>\r\n    <\/action>\r\n\r\n    <action name=\"authendicate\" class=\"com.rajesh.Authendicate\" method=\"verify\">\r\n        <result>\/menu\/success.jsp<\/result>\r\n    <\/action>\r\n<\/package><\/pre>\n

We can provide four parameters with package declaration.<\/p>\n

    \n
      \n
    1. name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Name of the package (required)<\/li>\n
    2. namespace\u00a0\u00a0 –\u00a0\u00a0 Namespace for the actions in the package<\/li>\n
    3. extends\u00a0\u00a0\u00a0\u00a0 –\u00a0 \u00a0 \u00a0 Parent package to inherit<\/li>\n
    4. abstract\u00a0\u00a0\u00a0 –\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 If true this package will only be used to define inheritable components not actions. (Discuss in detail later)<\/li>\n<\/ol>\n<\/ol>\n