Google

Interview Questions Test your java skills Java API Reference Notifications Java Forums Java Examples Tell a Friend
Link to us Donate
Javagalaxy.com WWW
Subscribe Un Subscribe

Java Interview Questions on your mobileNew            

Java Interview Questions - JavaGalaxy.com

  Java Interview Questions                       Is your Interview Question not answered here? Send it to webmaster@javagalaxy.com, we will answer it.

    Search Interview Questions 

  Displaying     Interview Questions and answers.

  Please click here to give us Feedback / Suggestions on how we can improve Java interview questions and answers

 
 Question   What is the difference between Action messages & Action errors?  (Struts)  Discuss in Detail (QID: 696)
 Answer  Click on Discuss in Detail link for more details   Any one would like like to answer this question?

 Question   What are the tokens available in Struts?  (Struts)  Discuss in Detail (QID: 695)
 Answer  Click on Discuss in Detail link for more details   Any one would like like to answer this question?

 Question   How to handle multiple forms using Struts?
Question by Navata Gudapati  (Struts)  Discuss in Detail (QID: 678)
 Answer    What I understand from your question is, You are having multiple forms in different pages and needs to
process this information to server at the last form.

e.g. Form 1, 2, 3 and 4 in 4 different web pages and process the data to server at the final web page.

It is easy to have a form that spans multiple jsp's with struts. Make sure that your form bean is part
of the session and not the request object. Also be sure to include some type of form validation routine
that checks to make sure all of the required information has been submitted before you send the whole
form off to the server for processing.

You cannot have single web page with multiple forms and submit all of it at once. When you click on
submit button in a form only the form that has submit button will be submitted to server.

 Question   Explain ActionForward against JSP:forward  (Struts)  Discuss in Detail (QID: 645)
 Answer    jsp:forward is part of JSTL and will be used in JSP pages. It internally uses RequestDispatcher to forward the request to new jsp or servlet page

ActionForward is part of Struts framework and is used in Action class. It internally uses RequestDispatcher to forward the request to ActionServlet

 Question   Expalin JSP,Servlet Combination VS Struts Which is better and how?  (Struts)  Discuss in Detail (QID: 644)
 Answer  Click on Discuss in Detail link for more details   Struts is a framework based on Model-View-Controller (MVC) design paradigm. The Model represents the business or database code, the View represents
the page design code, and the Controller represents the navigational code. The Struts framework is designed to help developers create web applications
that utilize a MVC architecture. Struts framework internally uses Servlet Technology for processing the request and response.

Sun Microsystems has provided the JSP / Servlet API specifications, and its the web server or application server vendor who implements the logic for
the API.

 Question   What happens internally when actionMappings.findForward("target") method is called in Action class.  (Struts)  Discuss in Detail (QID: 589)
 Answer    actionMappings.findForward("target") method returns ActionForward object. An ActionForward represents a destination to
which the controller, RequestProcessor, might be directed to perform a RequestDispatcher.forward or
HttpServletResponse.sendRedirect to, as a result of processing activities of an Action class.

 Question   What is the role of ActioMapping object in Struts Action class?  (Struts)  Discuss in Detail (QID: 588)
 Answer    An ActionMapping knows about the mapping of a particular request to an instance of a particular Action class.

 Question   What is Struts Validator Framework?  (Struts)  Discuss in Detail (QID: 586)
 Answer    Struts Framework provides the functionality to validate the form data. It can be use to
validate the data on the users browser as well as on the server side. Struts Framework emits
the java scripts and it can be used to validate the form data on the client browser. Server side
validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class.

 Question   Can I have more than one struts-config.xml file?  (Struts)  Discuss in Detail (QID: 585)
 Answer    Yes. A sample configuration in web.xml file would look like this

<servlet>
       <servlet-name>action</servlet-name>
       <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
       <init-param>
              <param-name>config</param-name>
              <param-value>/WEB-INF/struts-config.xml</param-value>
       </init-param>
       <!-- module configurations -->
       <init-param>
              <param-name>config/exercise</param-name>
              <param-value>/WEB-INF/exercise/struts-config.xml</param-value>
       </init-param>
       <init-param>
              <param-name>config/upload</param-name>
              <param-value>/WEB-INF/upload/struts-config.xml</param-value>
       </init-param>
</servlet>

 Question   Explain about ActionServlet in Apache Struts  (Struts)  Discuss in Detail (QID: 584)
 Answer    ActionServlet acts as a controller in Struts. There can be only one ActionServlet defined
for a context. ActionServlet is defined in web.xml file of a context e.g. WEB-INF/web.xml

 
Showing 1 - 10 of 20 Records Next Last    Jump to page number       Current page number: 1

Displaying records per page

   - Discussions are available

Copyright © 2002 - 2010 JavaGalaxy.com,
All Rights Reserved Advertise| Feedback| Contact us| Terms of Use| Privacy Policy|

Help us to keep serving you better.
If you find any part of this site useful please support the site by linking to us