Overview of struts?, JAVA Programming

Assignment Help:

Struts is a framework with set of co operating servlets, classes and JSP tags that create a reusable MVC 2 design.

 

351_Struts.png

 

1. Client (Browser): A request from the client browser makes an HTTP request. The Web container will send to the request with an HTTP response, which gets displayed on the web browser.

2. Controller (ActionServlet class and RequestProcessor class): The controller accepts the request from the browser, and creates the decision where to send the request based on the struts-config.xml. Design pattern: Struts controller gives the command design pattern by invoking the Action classes based on the configuration  file  RequestProcessor  class's  process() and  the  struts-config.xml    function  uses     template function design pattern by invoking a sequence of methods like:

  • processPath(request, response) insert the request URI to calculate path element.
  • processMapping(request,response) use the path information to respond the action mapping
  • processRoles(request,respose,mapping) Struts Web application security which gives an authorization scheme. By default invokes request.isUserInRole().

 

  • processValidate(request,response,form,mapping) invokes the validate() function of the ActionForm.
  • processActionCreate(request,response,mapping)Æ accepts the name of the action class from the "type" attribute of the element.
  • processActionPerform(req,res,action,form,mapping) This function calls the execute method of the action class which is where business program is written.

3. ActionServlet : class is the controller part of the MVC design and is the core of the framework. It processes user requests, calculates what the user is trying to achieve according to the request, pulls data from the model to be given to the appropriate range, and selects the proper view to reaction to the user.

4. Workflow Logic (Action class): The Servlet sends the request to Action classes, which react as a thin wrapper to the business logic. The action class use control the workflow of the application. The Action class uses the Adapter design pattern. The Action class is a wrapper around the business program. The purpose of the Action class is to convert the HttpServletRequest to the business program. To use the Action class, subclass and overwrite the execute() function. The actual business logic could be in a separate package or EJB to allow reuse of business program in a protocol independent manner.

5. ActionForm class: Java presentation of HTTP input data. They may carry data over from one request to another, but usually represent the data submitted with the request.

 


Related Discussions:- Overview of struts?

Explain the term event handler, Explain the term Event Handler? An even...

Explain the term Event Handler? An event handler is a command that calls a function while an event happens, like as the user clicking a button.

Nelson-siegel parametric class of term structures, Since there are only a f...

Since there are only a finite number of bonds available in the market. There will always be "holes" to fill in when defining a yield curve in continuous time. A common approach is

How can you performance tune your database?, 1. De normalizes your tables w...

1. De normalizes your tables where required. 2. Proper use of index columns: An index based on numeric parts is more efficient than an index based on character columns. 3. Re

Explain the methods of java.lang.object, Explain The Methods of java.lang.O...

Explain The Methods of java.lang.Object? java.lang.Object gives a number of methods that are general to all objects. toString() is the most general such method. Because the def

Convert encrypted hsql database into csv format, Project Description: We...

Project Description: We have an encrypted HSQL Database which we need to convert into CSV format. HSQL DB . We have java application jar file which reads that database but no

Explain java.lang.string library in java, Explain java.lang.string library ...

Explain java.lang.string library in java? Strings are objects. Specifically they're instances of the class java.lang.String . This class has several methods which are useful f

Give an example of class or static members, Give an example of Class or sta...

Give an example of Class or static Members? Below is a Car class along with such a speedLimit field and getSpeedLimit() method. public class Car { private String licensePla

How to loading images in java, How to Loading Images in JAVA? Polygons,...

How to Loading Images in JAVA? Polygons, ovals, lines and text cover a lot of ground. The residual graphic object you need is an image. Images in Java are bitmapped GIF or JPEG

Need to code using java in netbeans for my dissertation, I need to code usi...

I need to code using java in netbeans for my dissertation which is in data mining domain...deals with privacy preserving of sensitive rules or items using association rule hiding

I want an idea for final year projects, i m confused what to take as a pro...

i m confused what to take as a project for final year in information tech cn u suggest some of the topic of software

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd