Java - Interview Questions and Answers for 'Web application' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2098 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Web application' - 22 question(s) found - Order By Newest

Recently asked in Accenture and Fidelity.
 Q1. Explain Flow of Spring MVC ?Spring
Admin
info@buggybread.com
Ans. The DispatcherServlet configured in web.xml file receives the request.

The DispatcherServlet finds the appropriate Controller with the help of HandlerMapping and then invokes associated Controller.

Then the Controller executes the logic business logic and then returns ModeAndView object to the DispatcherServlet.

The DispatcherServlet determines the view from the ModelAndView object.

Then the DispatcherServlet passes the model object to the View.

The View is rendered and the Dispatcher Servlet sends the output to the Servlet container.

Finally Servlet Container sends the result back to the user.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   architecture     Accenture  fidelity  IBM India      Basic        frequent


 Q2. What is session tracking and how do you track a user session in servlets?Java EE
Admin
info@buggybread.com
Ans. Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are:

User Authentication - occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password

Hidden form fields - fields are added to an HTML form that are not displayed in the client's browser. When the form containing the fields is submitted, the fields are sent back to the server

URL rewriting - every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change.

Cookies - a bit of information that is sent by a web server to a browser and which can later be read back from that browser.

HttpSession- places a limit on the number of sessions that can exist in memory.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   session   session management   web applications   cookies   httpsession   url rewriting   architecture     Infosys


 Q3. What is meant by an "asynchronous event." Give some examples ?Operating System
Anonymous
Ans. An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running. It is not "synchronized" with the program.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   internet   web application   asynchronus   asynchronus communication   architecture     Alten India


 Q4. Can we have multiple servlets in a web application and How can we do that ?Java EE
Anonymous
Ans. Yes by making entries in web.xml

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   servelets   web application   java   web.xml   yes-no   architecture


 Q5. How can we manage Error Messages in the web application ?Solution
Anonymous
Ans. Within message.properties file.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   web application   struts   spring     Trimax IT Infrastructure


 Q6. What bean scopes does Spring support? Explain them.Spring
Admin
info@buggybread.com
Ans. The Spring Framework supports following five scopes -

Singleton
prototype
request
session
global-session

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   beans   beans scope   at&t  fidelity


Very frequently asked.Usually among first few questions.
  Q7. What is MVC ? Design
Anonymous
Ans. The Model/View/Controller pattern, a strategy for dividing responsibility in a GUI component.

The model is the data for the component.

The view is the visual presentation of the component on the screen.

The controller is responsible for reacting to events by changing the model.

According to the MVC pattern, these responsibilities should be handled by different objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   mvc   mvc design pattern   design pattern   struts   spring   web application   web frameworks   ebay     HCL Technologies  Tata Consultancy (TCS)  Wipro  United Health Group (UHG)  Accenture  Fidelity  Fidelity Investments   Tieto  Walt Disney  Sharon Software Systems  Tech Mahindra  Amdocs  Deegit  Lexis Nexis  Elsevier      basic        frequent

Try 1 Question(s) Test


 Q8. What are different types of cookies ?Java EE
Admin
info@buggybread.com
Ans. Session cookies , which are deleted once the session is over.

Permanent cookies , which stays at client PC even if the session is disconnected.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   session   session management   web applications   cookies   httpsession


 Q9. What is a cookie ?Java EE
admin
info@buggybread.com
Ans. A cookie is a small piece of text stored on a user's computer by the browser for a specific domain. Commonly used for authentication, storing site preferences, and server session identification.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     cookie   javascript   web application   session management   browser   j2ee     Wayfair  OpenBet  Akamai      basic        frequent



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. What is servlet Chaining ?Java EE
Anonymous
Ans. Multiple servlets serving the request in chain.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   web application   servlets     Barclays        rare


 Q11. what is the use of cookie and session ? and What is the difference between them ?Java EE
Anonymous
Ans. Cookie and Session are used to store the user information. Cookie stores user information on client side and Session does it on server side. Primarily, Cookies and Session are used for authentication, user preferences, and carrying information across multiple requests. Session is meant for the same purpose as the cookie does. Session does it on server side and Cookie does it on client side. One more thing that quite differentiates between Cookie and Session. Cookie is used only for storing the textual information. Session can be used to store both textual information and objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     session   session management   java   cookies   authentication   web application   ebay      intermediate


 Q12. What are different modules of spring ?
Spring
Admin
info@buggybread.com
Ans. There are seven core modules in spring

Spring MVC
The Core container
O/R mapping
DAO
Application context
Aspect Oriented Programming or AOP
Web module

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications


 Q13. What is Spring configuration file?Spring
Anonymous
Ans. Spring configuration file is an XML file. This file contains the classes information and describes how these classes are configured and introduced to each other.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   spring configuration file     Bosch


 Q14. Q: What is default scope of bean in Spring framework?
Spring
Admin
info@buggybread.com
Ans. The default scope of bean is Sing leton for Spring framework.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   bean


Very Frequently asked Spring question.
  Q15. What is bean auto wiring?Spring
Admin
info@buggybread.com
Ans. The Spring container is able to autowire relationships between collaborating beans. This means that it is possible to automatically let Spring resolve collaborators (other beans) for your bean by inspecting the contents of the BeanFactory without using and elements.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   spring   mvc   frameworks   web applications   autowiring   beans   at&t   ge     Infosys  HCL Technologies  Tata Consultancy  Wipro  PwC  Tech Mahindra  AT&T  General Electric  Sophos        frequent


 Q16. What are the phases of the JSP life cycle ?Java EE
Admin
info@buggybread.com
Ans. Translation of JSP PageCompilation of JSP PageClassloading (class file is loaded by the classloader)Instantiation (Object of the Generated Servlet is created).Initialization ( jspInit() method is invoked by the container).Reqeust processing ( _jspService() method is invoked by the container).Destroy ( jspDestroy() method is invoked by the container).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   servelets   web application   jsp   jsp life cycle   mindtree     Span Infotech  PTC  Cybage  iNautix Technologies  TechAspect  Brillio  Modus Information Systems  SAG Infotech   TechProcess Payment Services


 Q17. Difference between the jsp scriptlet tag and jsp declaration tag?Java EE
Anonymous
Ans. The jsp scriptlet tag can only declare variables not methods whereas jsp declaration tag can declare variables as well as methods.

The declaration of scriptlet tag is placed inside the _jspService() method whereas The declaration of jsp declaration tag is placed outside the _jspService() method.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   jsp   scriptlet tag   declaraation tag   web application


 Q18. What are JSP directives ? What are different types of directives ?Java EE
Admin
info@buggybread.com
Ans. The jsp directives are messages that tells the web container how to translate a JSP page into the corresponding servlet.

There are three types of directives -

page directive
include directive
taglib directive

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   servelets   web application   jsp   jsp ldirectives


 Q19. What is the use of HTTPSession in relation to http protocol ?Java EE
Admin
Admin
Ans. http protocol on its own is stateless. So it helps in identifying the relationship between multiple stateless request as they come from a single source.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   web application   session   httpsession   architecture     uCertify



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q20. Why using cookie to store session info is a better idea than just using session info in the request ?Java EE
Admin
info@buggybread.com
Ans. Session info in the request can be intercepted and hence a vulnerability. Cookie can be read and write by respective domain only and make sure that right session information is being passed by the client.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   session   session management   web applications   cookies   httpsession   architecture


 Q21. http protocol is by default ... ?Java EE
Admin
info@buggybread.com
Ans. stateless

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     j2ee   servlets   session   session management   web applications   cookies   httpsession   architecture


 Q22. Have you ever faced any problem due to caching?
Admin
info@buggybread.com
Ans. Yes , sometime we receive issues related to outdated pages being rendered to the user. In those cases we clear the cache and then try to investigate the reason for that. Sometime the issue is due to comparatively high refresh interval. In those cases we reduce the cache refresh interval.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     caching   cache   java   web applications   production support   application support




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: