struts 2 - the modern web application framework by nalin de zoysa
TRANSCRIPT
![Page 1: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/1.jpg)
Struts 2 - The modern web application frameworkBy Nalin De Zoysa
http://nalin-blogging.blogspot.com/
![Page 2: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/2.jpg)
Setup the Environment
Download the struts2 Create web project in eclipse Add the strtus libs to the project Create the struts.xml in src Create loginAction.java Create view(.jsp) Configure the web.xml
![Page 3: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/3.jpg)
![Page 4: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/4.jpg)
Introduce Maven
• What is maven– Apache Maven is a build tool to support the developer at the whole process of a
software project.
– Based on the concept of XML Project Object Model (POM).
– Originally developed for building Turbine.
– A small core with numerous plugins
![Page 5: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/5.jpg)
![Page 6: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/6.jpg)
Use the business service..
Create service class and call it in action In jsp use the struts tags
![Page 7: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/7.jpg)
Access member variables
![Page 8: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/8.jpg)
Cont..
![Page 9: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/9.jpg)
Value Stack
![Page 10: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/10.jpg)
Demonstration...
Lets use maven demo
![Page 11: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/11.jpg)
How to pass the parameters
Send as get Send as post whildcards
![Page 12: Struts 2 - The modern web application framework By Nalin De Zoysa](https://reader034.vdocument.in/reader034/viewer/2022052414/56649f345503460f94c5132f/html5/thumbnails/12.jpg)
www.hSenidbiz.comwww.hSenidbiz.com