Struts

  1. What is Struts?

Struts is a framework based on set of Java technologies like Servlet, JSP, JSTL, XML etc which provides implementation of MVC architecture. The framework also provides ready to use validation framework. The power of Struts lies in its model layer by which Struts can be integrated with other Java technologies like JDBC, EJB, spring, Hibernate and many more.

Struts is an open source framework developed by Apache Software foundation. It can be downloaded as a free source from apache website. Struts can be broadly classified as Struts 1.X and Struts 2.X. Though Struts 2.X is successor of Struts 1.X, there is a vast difference between them. Struts 2.x is based on WebWorks2 framework. Struts 2.x is also called as pull-MVC architecture because data that needs to be displayed to the user can be pulled from the Action (a class which contains business logic).

  1. Why Struts?
  • Struts Framework is a collaboration of JSP + Servlets + HTML + Database + POJO’s (Plain Old Java Object – the java objects that are not bound to any specific programming language) + JSTL (JSP Standard Tag Library – for user defined tags) in one unit.
  • The framework thus results in very fast and efficient development of web applications with security and database integrity.
  • The framework creates applications that are flexible in nature, can be extended and modified easily without making changes in actual business logic.
  • An input form validation is enabled by default in Struts. It asks the programmer for validation properties at the time of designing only.
  • Whenever a new java class is created, the class gets its features automatically added in xml configuration file. This facilitates programmer because large number of classes are to be created for a web application.

Benefits:

  • Struts make the web application development easy.
  • The framework is open source and freely available.
  • Powerful features of JSP API are included in Struts framework
  • It is very easy to use an inbuilt module – just inherit the properties by sub-classing the java class.
  • JSTL (JSP Standard Tag Library) provides the features of creating customized tags in Struts. These tags help the programmers to implement business logics easily by adding attributes to the tags as per requirement.
  • XML configuration files are automatically created for classes. Every time a new class is created, its configuration gets added to the XML file.
  • Thus the framework is flexible and easy to use. Maintenance is not much required until and unless under damaged conditions.
  • Images can be processed easily in Struts Framework. There is a separate module that handles image processing very efficiently.
  • Struts have extension for jQuery plugin (to provide the functionality for AJAX + User Interface facilities like Table Grid, Tree, Pane, Graphs and Charts).
  • Struts frameworks also have extension for JSF (Java Server Faces).
  • Struts have extension for Junit plugin (this plugin is used for testing purpose).
  • Hibernate extension is also available with Struts framework version 2.
  1. How to prepare for Struts?
  • Clean and Dry – Before loading the strut into the spring compressor, be sure it is clean and dry. Oil and grease can lead to slippage or damage.
  • Proper Lubrication – Lubricated threads, engine oil being a good choice, makes the spring compressor easier to use. Use only hand tools for even spring compression and best tool life.
  • On Your Marks – Before disassembly, use a paint marker to add alignment marks to the strut cartridge, spring insulators, spring, plate, and upper mount. This makes it easier to put everything back together straight.
  • Extra Hand – Locking pliers are a good extra hand and can prevent the tool from slipping. Clamp the pliers to the spring adjacent to the spring compressor jaws.
  • Torque Specifications – Because struts are important to your vehicle stability and safety, proper torque, not just good-n-tight, keeps everything from coming undone down the road. A repair manual and torque wrench are your best friends.
  • Replace ’em All – Chances are good that if one strut has failed, the others aren’t far behind. It’s typically recommended to replace the opposite strut at the same time. Similarly, you might consider doing the opposite axle, too. You’ll save time doing everything at once, especially once you add the alignment procedure.
  • Test Drive – Before heading for the alignment shop, take a small test drive. Wiggle the steering wheel, bounce the vehicle, hit a speed bump, accelerate and brake, all the while listening and feeling for loose parts.
  • Wheel Alignment – After strut replacement, it’s a good idea to have the vehicle aligned. Slight variations in strut alignment can skew suspension and steering angles, leading to abnormal tire wear or steering problems.
  • Don’t Stretch – When removing the shock or strut from the vehicle, support the lower suspension with a jack stand. The suspension may hang lower than normal, which can damage the brake line or wheel speed sensor cable.
  • Replace Everything – It’s usually not a good idea to replace just the obviously-failed parts of the strut assembly. It’ll be double the work to go back in later to replace a bearing, mount, or insulator. Better yet, a whole strut assembly can save even more time.
  • Break-In Time – Immediately after strut replacement, you’ll likely notice the vehicle to be stiffer or higher than before, especially if installing new springs. It takes time, at least a few hundred miles, for the struts to break in under the weight of the vehicle.

 

  1. Important materials:
  2. E-books:
  • Jakarta Struts Live (by Rick Hightower, PDF)
  • The Complete Apache Struts Tutorial
  • Struts Tutorial for Beginners.
  • Jakarta Struts 1.2 Tutorial (Marty Hall)
  • Demystifying Jakarta Struts (Marty Hall)
  • LaLiLuna Tutorials for Struts, EJB, MyEclipse
  • Stepping through Jakarta Struts (by Keld H).
  1. Videos:

Struts tutorials:

https://youtu.be/xxRmW8Jgt_s

Struts videos:

https://youtu.be/NTRvSqX9kDQ

  1. Sample test papers on Struts:

Struts sample paper1:

http://technicalstack.com/struts-1-x-interview-questions-and-answers-1/

  1. Certifications on Struts:


Exam Details

Exam Name : Providence Certified Java Application Frameworks Developer
Pre-requisites : None
Exam Type : Multiple Choice + Assignment
Duration : 3 Hrs
Clearing Score : 75 %
Mapped to Program : Java Frameworks Architect
Fee : Free of Cost with
Java Frameworks Architect Training Program

 

  1. Important tips on Struts:
  • POJO Forms and POJO Actions − Struts2 has done away with the Action Forms that were an integral part of the Struts framework. With Struts2, you can use any POJO to receive the form input. Similarly, you can now see any POJO as an Action class.
  • Tag Support − Struts2 has improved the form tags and the new tags which allow the developers to write less code.
  • AJAX Support − Struts2 has recognized the take over by Web2.0 technologies, and has integrated AJAX support into the product by creating AJAX tags, this function is very similar to the standard Struts2 tags.
  • Easy Integration − Integration with other frameworks like Spring, Tiles and SiteMesh is now easier with a variety of integration available with Struts2.
  • Template Support − Support for generating views using templates.
  • Plugin Support − the core Struts2 behavior can be enhanced and augmented by the use of plugins. A number of plugins are available for Struts2.
  • Profiling − Struts2 offers integrated profiling to debug and profile the application. In addition to this, Struts also offers integrated debugging with the help of built in debugging tools.
  • Easy to Modify Tags − Tag markups in Struts2 can be tweaked using Freemarker templates. This does not require JSP or java knowledge. Basic HTML, XML and CSS knowledge is enough to modify the tags.
  • Promote Less configuration − Struts2 promotes less configuration with the help of using default values for various settings. You don’t have to configure something unless it deviates from the default settings set by Struts2.
  • View Technologies − Struts2 has a great support for multiple view options (JSP, Free marker, Velocity and XSLT)

Be the first to add a review.

Please, login to leave a review
Add to Wishlist
Get course
Enrolled: 0 students