Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Java EE - Interview Questions and Answers for 'Java EE' - 58 question(s) found - Order By Newest | ||||
| ||||
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 Asked in 1 Companies | ||||
| ||||
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 | ||||
| ||||
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 | ||||
Frequently asked. Among first few questions in the J2EE segment of interview. | ||||
| ||||
Ans. Deployment Descriptor which is usually web.xml is used to specify the classes, resources and configuration of the application and how the web server uses them to serve web requests.This file is usually added to WEB-INF folder and contains following * Servlet entries and url mapping * Plugins * Some info regarding authentication / filters * Landing Page * Event Handlers | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  web.xml   servlets  deployment descriptor Asked in 15 Companies basic   frequent | ||||
Try 1 Question(s) Test | ||||
| ||||
Ans. web.xml | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  configuration files   deployment   server   java | ||||
| ||||
Ans. URL is Uniform Resource Locator which is representation of HTTP address. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   http   internet   url basic   rare | ||||
| ||||
Ans. HTTP or Hypertext Transfer Protocol is internet protocol for tranmission of hypertext ( text with meta data ) over internet. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   http   internet  fidelity Asked in 2 Companies basic   frequent | ||||
| ||||
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 | ||||
| ||||
Ans. servlet is a small, server-resident program that typically runs automatically in response to user input. A network socket is an endpoint of an inter-process communication flow across a computer network. We can think of it as a difference between door and gate. They are similar as they both are entry points but they are different as they are put up at different areas. Sockets are for low-level network communication whereas Servlets are for implementing websites and web services | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   networking   servlet   socket   difference between.java.net   technologies   architecture | ||||
| ||||
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 | ||||
| ||||
Ans. Jar is Java Archieve i.e compressed Class or Class / Java files. War comprises of compressed Servlet class files,JSP FIles,supporting files, GIF and HTML files. Ear comprise of compressed Java and web module files ( was files ). | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   jar   web development   war   ear   build management   release management Asked in 12 Companies basic   frequent | ||||
| ||||
Ans. It's an object that can intercept http request and response and hence we can take appropriate action on those requests. There are different types of filters based on Specifications like Authentication Logging Encryption Tokenizing etc | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  servlets  servlet filters Asked in 3 Companies basic   frequent | ||||
| ||||
Ans. Authentication / Authorization URL forwarding Auditing / Logging Localization | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  interceptors  interceptor design pattern | ||||
| ||||
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 Asked in 16 Companies basic   frequent | ||||
| ||||
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 Asked in 1 Companies   rare | ||||
| ||||
Ans. The config object is an instantiation of javax.servlet.ServletConfig and is a direct wrapper around the ServletConfig object for the generated servlet. This object allows the JSP programmer access to the Servlet or JSP engine initialization parameters such as the paths or file location. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   servlet   jsp   servlet config   servletconfig   javax | ||||
| ||||
Ans. The pageContext object is an instance of a javax.servlet.jsp.PageContext object. The pageContext object is used to represent the entire JSP page. This object stores references to the request and response objects for each request. The application, config, session, and out objects are derived by accessing attributes of this object.The pageContext object also contains information about the directives issued to the JSP page, including the buffering information, the errorPageURL, and page scope. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  j2ee   servlet   jsp   pagecontext   page context | ||||
| ||||
Ans. LDAP servers are typically used in J2EE applications to authenticate and authorise users. LDAP servers are hierarchical and are optimized for read access, so likely to be faster than database in providing read access. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   ldap   servers   authentication   authorization   architecture   technical lead   technical architect  production support Asked in 1 Companies | ||||
| ||||
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 Asked in 9 Companies | ||||
| ||||
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 | ||||
| ||||
Ans. Better Performance as Servlets doesn't require a separate process for a single request. Servlets are platform independent as they are written in Java. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   j2ee   servlets   servelets   cgi | ||||
| ||||
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 Asked in 1 Companies | ||||
| ||||
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 | ||||
| ||||
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 | ||||
| ||||
Ans. Single SessionFactory object and multiple session objects for opening different session. Hibernate creates new Session object per thread. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  hibernate   sessionfactory hibernate   session hibernate | ||||
| ||||
Ans. Http is connection less by default. header informs hosts to keep the connection alive so that the same connection can be reused for multiple communication. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   http   http-alive   client server communication | ||||
| ||||
Ans. No | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  servlets   j2ee   web | ||||
| ||||
Ans. jQuery is a cross platform JavaScript library designed to simplify the client-side scripting of HTML. JQuery is the most popular JavaScript library. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  jquery Asked in 1 Companies | ||||
| ||||
Ans. An Internet Protocol address is a numerical label assigned to each device participating in a computer network. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  ip address Asked in 2 Companies basic   frequent | ||||
| ||||
Ans. URI stands for Uniform Resource Indicator URL stands for Uniform Resource Locator URN stands for Uniform Resource Name URI = URL + URN For ex - http://javasearch.buggybread.com/InterviewQuestions/questionSearch.php?keyword=url This is URI. The string from start till .php is URL whereas keyword=url is URN. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  url  urn  uri  web address  internet address Asked in 1 Companies | ||||