what is request processor class ?

Answers were Sorted based on User's Feedback



what is request processor class ?..

Answer / sekgar

Request processor is a class which is under the controller
layer.this class is uesd to acces the client request from
the actionServlet process the req and then dispatches to the
next layer i.e Model(Action class).Finally Action class
calls the execute() and and it return the ActionForward to
client.

Is This Answer Correct ?    30 Yes 9 No

what is request processor class ?..

Answer / teja

Class is the actual place where the request processing
takes place in a Struts controller environment.

When the request object first reaches the actionservlet
class then it invokes the process method of the underlying
RequestProcessor Class.

This process method then looks into the struts-config.xml
file and tries to locate the name of the action that has
come with the request.Once it identifies the action in the
xml file it continues the rest of the steps needed for
request processing.

processor has most of the following responsibilities:

1.Determine path,
2.Handle Locale,
3.Process content and encoding type,
4.Process cache headers
5.Pre Processing hook
6.Pre-processing hook,
7.Determine mapping,
8.Determine roles,
9.Process and validate actionForm,
10.Return a response

Is This Answer Correct ?    9 Yes 1 No

what is request processor class ?..

Answer / karthick

In struts the Action servlet serves as a front controller
where it receives all the request from the client. All those
requests are delegated to the RequestProcessor class. In
this class process method will be invoked with httprequest
and response objects.
This method has so many method calls to populate the forms,
associating the request to the proper mapping etc.

For more details
:http://www.onjava.com/pub/a/onjava/2004/11/10/ExtendingStruts.html

Is This Answer Correct ?    12 Yes 5 No

what is request processor class ?..

Answer / nagendra

RequestProcessor is an helper class to
ActionServlet(controller).
Actually ActionServlet is dummy all the work which is done
with the help of RequestProcessor using the method process()

ActionServlet is declarativly defined in web.xml and
RequstProcessor is an predefined class.
we can create our own RequstProcessor class

Is This Answer Correct ?    7 Yes 3 No

what is request processor class ?..

Answer / samba

in RequestProcessor we have process()
this process method used to process the enduser request
and it is called by the action servlet doget()or dopost()
method by default it work one way
if u want change the flow of the application before
invoking our action classes we to implent the
requestprocess class

Is This Answer Correct ?    4 Yes 1 No

what is request processor class ?..

Answer / rajesh

We say that ActionServlet is the backbone of the struts application but actually it just receives the request and invoke RequestProcessor process() method and this RequestProcessor processes all aspects of the request.
If the above is true , then RequestProcessor should be the heart of struts application or do we consider {ActionServlet + Requestprocessor} as a single unit when we say "ActionServlet is the backbone of the struts application".

1. ActionServlet receives the request.
2. The doPost() or doGet() methods receive a request and invoke the process() method.

3. The process() method gets the current RequestProcessor and invokes the RequestProcessor. process() method

4.The RequestProcessor.process() method is where the current request is actually serviced. This method retrieves, from the struts-config.xml file, the <action> element that matches the path submitted on the request. It does this by matching the path passed in the <html:form /> tag's action element to the <action> element with the same path value

5. When the RequestProcessor.process() method has a matching <action>, it looks for a <form-bean> entry that has a name attribute that matches the <action> element's name attribute.

6. When the RequestProcessor.process() method knows the fully qualified name of the FormBean, it creates or retrieves a pooled instance of the ActionForm named by the <form-bean> element's type attribute and populates its data members with the values submitted on the request

7. After the ActionForm's data members are populated, the RequestProcessor.process() method calls the ActionForm.validate() method, which checks the validity of the submitted values.

8. At this point, the RequestProcessor.process() method knows all that it needs to know and it is time to actually service the request. It does this by retrieving the fully qualified name of the Action class from the <action> element's type attribute, creating or retrieving the named class, and calling the Action.execute() method

9. When the Action class returns from its processing, its execute() method returns an ActionForward object that is used to determine the target of this transaction. The RequestProcessor.process() method resumes control, and the request is then forwarded to the determined target.

10. At this point, the ActionServlet instance has completed its processing for this request and is ready to service future requests.


Most of the controlling work is done by RequestProcessor and still we say ActionServlet is the backbone ?

Is This Answer Correct ?    1 Yes 0 No

what is request processor class ?..

Answer / madhu

1.Request processor class contains th code of form
processing logic.
2.it follows the chain of responsibility.
3.action servlet sends the request to the RP.
4.RP binds the values to the form bean by calling setters
and dispath the request to the following according the
situation.
a.errors handlers
b.forwards

Is This Answer Correct ?    6 Yes 6 No

what is request processor class ?..

Answer / ramu

Whenever client send the request to sever is check is there web. XML file.And the read the contents in web. XML file and store into JVM's memory.
After ur using <load-on-startup> sever is created ActionServlet Object.In second second init()method and the reads the contents stored in JVM's memory.
Now sever is created Request and Response Object's and hadover to ActionServelt Service().

Is This Answer Correct ?    0 Yes 3 No

what is request processor class ?..

Answer / sdafdsfafd

Whbsncxznczmxbcmzcxbmzxcnxzcn

Is This Answer Correct ?    1 Yes 4 No

what is request processor class ?..

Answer / guest

asdf

Is This Answer Correct ?    2 Yes 34 No

Post New Answer

More Struts Interview Questions

At the point, you should go for struts framework?

0 Answers  


What is the purpose of @stringlengthfieldvalidator annotation?

0 Answers  


What is the purpose of execute method of action class?

0 Answers  


How do you convert struts to springs?

0 Answers  


What is spring and struts in java?

0 Answers  






What do you mean by the abstract package in struts2, and what is its utilization?

0 Answers  


Who wrote struts?

0 Answers  


How is a lookup dispatch action created?

0 Answers  


What configuration changes are required to use resource files in Struts?

0 Answers  


Can we write Structs application without using Action Class directly or indirectly(extends Action class)

5 Answers  


Are struts still used?

0 Answers  


what r the disadvantages of MVC-2 Architecture?

2 Answers   Process IT,


Categories