Exercise 8: Creating Struts Modules : Struts : J2EE : Java examples (example source code) Organized by topic

Java
C++
PHP
Java Home »  J2EE   » [  Struts  ]  Screenshots 
 



Exercise 8: Creating Struts Modules

/*
First edition copyright 2004 ObjectSource LLC. All rights reserved.
This training material and the accompanying lab exercises were prepared 
by Srikanth Shenoy for ObjectSource LLC.

GRANT OF LICENSE: ObjecSource LLC grants you a non-exclusive license to 
use the material. No part of this publication may be reproduced, stored 
in a retrieval system or transmitted in any form or by any means 
electronic, mechanical, photocopying, recording or otherwise, without 
the prior written permission of ObjectSource LLC. At its discretion, 
ObjectSource LLC may provide limited support through email or discussion 
forums at ObjectSource web site. ObjectSource incurs no obligation 
to provide any support under this Agreement.
*/
/*
Technical Objectives for this exercise: 
The technical objectives of this exercise is to learn ?how to?: 
Create Struts application modules and break monolithic struts module into pieces 
NOTE: 
1. For the sake of maintaining simplicity and clarity in rest of the exercise, we will not attempt to 
2. The index page belongs to the default module. From the index page, we will provide a link to go 
break the existing application into modules. Rather we will add a new module. 
to module2. Module 2 will consist of a two dummy pages that can call each other and also have a 
link to return to default module. 
a) Change the web.xml to define a new module named xyz as follows: 
<init-param> 
<param-name>config/xyz</param-name> 
<param-value>/WEB-INF/struts-config-xyz.xml</param-value> 
</init-param> 
b) Copy over the struts-config.xml to create a new struts-config-xyz.xml 
c) Create a empty XYZ Message Resources 
d) Clean up the struts-config-xyz.xml to retain only empty blocks for form-beans, action 
mappings etc. Add the message resource bundle definition to struts-config-xyz.xml. 
e) Add SwitchAction to struts-config.xml & struts-config-xyz.xml as follows: 
<action path="/switch" type="org.apache.struts.actions.SwitchAction"/> 
f) Create a folder called xyz under the src/web directory. Create two jsps: xyz-page1.jsp & xyzpage2.
jsp (Copy over index.jsp & change contents) 
.....
*/

           
       
Download: struts-training.zip   ( 26,264  K )  
Related examples in the same category
1.  Exercise 1: Building your first Struts ApplicationHas Download File Exercise 1: Building your first Struts Application
2.  Exercise 2: Improving your first Struts Application Has Download File Exercise 2: Improving your first Struts Application
3.  Exercise 3: Using JSTL, Struts-EL etcHas Download File Exercise 3: Using JSTL, Struts-EL etc
4.  Struts Recipes: Build Struts with AntHas Download File
5.  Using bean:resource to expose the struts.config.xml to your viewHas Download File
6.  Create a pluggable validator for cross-form validation 2Has Download File Create a pluggable validator for cross-form validation 2
7.  Struts: Generate a response with XSL Has Download File
8.   Hibernate and Struts Has Download File  Hibernate and Struts
9.   In-container testing with StrutsTestCase and Cactus Has Download File
10.  Exercise 4: Applying Gof and J2EE Patterns:Deploy to WebLogic and Test Has Download File
11.  Exercise 5: Search, List, Action Chaining, Editable List Form Has Download File
12.  Exercise 6: Paging Has Download File
13.  Exercise 7: Better Form and Action Handling Has Download File
14.  Exercise 9: Using Commons Validator with Struts Has Download File
15.  Exercise 10: Using Struts and Tiles Has Download File
16.  Essential Struts ActionHas Download File Essential Struts Action
17.  A Full Struts ApplicationHas Download File A Full Struts Application
18.  Struts Creating the ViewHas Download File Struts Creating the View
19.  Struts: Creating the ModelHas Download File Struts: Creating the Model
20.  Struts: Creating the ControllerHas Download File Struts: Creating the Controller
21.  Creating Custom TagsHas Download File Creating Custom Tags
22.  The Struts TagsHas Download File The Struts Tags
23.  The Struts and TagsHas Download File The Struts and Tags
24.  Web Services and the Validator and Tile PackagesHas Download File Web Services and the Validator and Tile Packages
25.  Struts Framework: A Sample Struts ApplicationHas Download File Struts Framework: A Sample Struts Application
26.  Struts Framework ValidatorHas Download File
27.  Struts Framework: TilesHas Download File Struts Framework: Tiles
28.  Struts Framework: Declarative Exception HandlingHas Download File
29.  Struts: Internationalizing Struts ApplicationsHas Download File
30.  Securing Struts ApplicationsHas Download File
31.  Testing Struts ApplicationsHas Download File
32.  Struts exampleHas Download File Struts example
33.  Blank Struts templateHas Download File Blank Struts template
34.  Struts FrameworkHas Download File
35.  Struts: bank applicationHas Download File Struts: bank application
36.  Struts applicationHas Download File Struts application
37.  Struts application 2Has Download File Struts application 2








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.