ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Struts
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1721)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (146)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
what is request processor class ?
 Question Submitted By :: Struts
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
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
Sekgar
 
Answer
# 2
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
Karthick
 
 
 
Answer
# 3
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 ?    8 Yes 1 No
Teja
 
Answer
# 4
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
Nagendra
 
Answer
# 5
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
Samba
 
Answer
# 6
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
Madhu
 
Answer
# 7
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 ?    0 Yes 0 No
Rajesh
 
Answer
# 8
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
Ramu
 
Answer
# 9
Whbsncxznczmxbcmzcxbmzxcnxzcn 
Is This Answer Correct ?    1 Yes 4 No
Sdafdsfafd
 
Answer
# 10
asdf 
Is This Answer Correct ?    2 Yes 34 No
Guest
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
is it possible to see actionservlet in my system. if yes how   5
What is Hibernate?   4
what are the disadvantages of MVC architecture INDUS 3
Difference between JSF Framework and Struts Framework. Accenture 13
What is the difference between a Strut and a Class?   1
i have 500 jsps in my application,and i have same forward name for each jsp,so it lokks in strutsconfig.xml,from 1 to 500,but i want send 498 page directly,how can i cingigure my application TCS 2
collection framework hirarchy?   5
why servlet is used as controller not JSP? MCS 6
what is the difference between *.do & /do.*/? So what is the diffenence btn extension mapping & path mapping.What is those difference in work effect? Wipro 6
where you will implement the tiles in struts? Wipro 2
whats is mean Actionerrors and Actionerror? Wipro 5
what is BUSINESS DELIGATE PATTERN,DAO,VO,DTO? TCS 6
 
For more Struts Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com