Skip to main content

Freshers & Experienced Openings July 2024

https://www.pharmatutor.org/content/july-2024/biocon-biologics-walk-in-drive-for-mpharm-bpharm-msc-in-qa-qc-manufacturing

Java J2EE Interview Questions and Answers - Part 6

  1. What are the types of statements in JDBC?- Statement: to be used createStatement() method for executing single SQL statement PreparedStatement — To be used preparedStatement() method for executing same SQL statement over and over. CallableStatement — To be used prepareCall() method for multiple SQL statements over and over.
  2. What is stored procedure?- Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters.
  3. How to create and call stored procedures?- To create stored procedures: Create procedure procedurename (specify in, out and in out parameters) BEGIN Any multiple SQL statement; END; To call stored procedures: CallableStatement csmt = con. prepareCall(”{call procedure name(?,?)}”); csmt. registerOutParameter(column no. , data type); csmt. setInt(column no. , column name) csmt. execute();
  1. What is servlet?- Servlets are modules that extend request/response-oriented servers, such as java-enabled web servers. For example, a servlet might be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company’s order database.
  2. What are the classes and interfaces for servlets?- There are two packages in servlets and they are javax. servlet and
  3. What is the difference between an applet and a servlet?- a) Servlets are to servers what applets are to browsers. b) Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.
  1. What is the difference between doPost and doGet methods?- a) doGet() method is used to get information, while doPost() method is used for posting information. b) doGet() requests can’t send large amount of information and is limited to 240-255 characters. However, doPost()requests passes all of its data, of unlimited length. c) A doGet() request is appended to the request URL in a query string and this allows the exchange is visible to the client, whereas a doPost() request passes directly over the socket connection as part of its HTTP request body and the exchange are invisible to the client.
  2. What is the life cycle of a servlet?- Each Servlet has the same life cycle: a) A server loads and initializes the servlet by init () method. b) The servlet handles zero or more client’s requests through service() method. c) The server removes the servlet through destroy() method.
  3. Who is loading the init() method of servlet?- Web server
  1. What are the different servers available for developing and deploying Servlets?- a) Java Web Server b) JRun g) Apache Server h) Netscape Information Server i) Web Logic
  2. How many ways can we track client and what are they?- The servlet API provides two ways to track client state and they are: a) Using Session tracking and b) Using Cookies.
  3. What is session tracking and how do you track a user session in servlets?- 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: a) 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. b) 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. c) 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. d) 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. e) HttpSession- places a limit on the number of sessions that can exist in memory. This limit is set in the session. maxresidents property.
  1. What is Server-Side Includes (SSI)?- Server-Side Includes allows embedding servlets within HTML pages using a special servlet tag. In many servlets that support servlets, a page can be processed by the server to include output from servlets at certain points inside the HTML page. This is accomplished using a special internal SSINCLUDE, which processes the servlet tags. SSINCLUDE servlet will be invoked whenever a file with an. shtml extension is requested. So HTML files that include server-side includes must be stored with an . shtml extension.
  2. What are cookies and how will you use them?- Cookies are a mechanism that a servlet uses to have a client hold a small amount of state-information associated with the user. a) Create a cookie with the Cookie constructor: public Cookie(String name, String value) b) A servlet can send a cookie to the client by passing a Cookie object to the addCookie() method of HttpServletResponse: public void HttpServletResponse. addCookie(Cookie cookie) c) A servlet retrieves cookies by calling the getCookies() method of HttpServletRequest: public Cookie[ ] HttpServletRequest. getCookie().
  3. Is it possible to communicate from an applet to servlet and how many ways and how?- Yes, there are three ways to communicate from an applet to servlet and they are: a) HTTP Communication(Text-based and object-based) b) Socket Communication c) RMI Communication

Comments

Popular Posts

Freshers & Experienced Openings July 2024

https://www.pharmatutor.org/content/july-2024/biocon-biologics-walk-in-drive-for-mpharm-bpharm-msc-in-qa-qc-manufacturing

Wise Disk Cleaner

Wise Disk Cleaner is a free disk utility designed to help you keep your disk clean by deleting any unnecessary files. Wise Disk Cleaner, with its intuitive and easy to use interface, helps to quickly wipe out all the junk files. It works quite fast while scanning for files and deleting them. The developers aver that it the first system slimming tool that removes Windows useless files, Windows Sample music, videos, pictures, Installers and Uninstallers of Updates Patches etc. Wise Disk Cleaner supports Windows XP/Vista /7/8 (All Editions, including 32-bit and 64-bit) and server 2000, 2003 and 2008. http://www.wisecleaner.com/soft/WDCFree.exe

Java, Developer / Sr. Developer WALK-IN Mumbai & Bangalore on Saturday 10th March 2012

Our next WALK-IN event for experienced software professionals is scheduled in Mumbai & Bangalore on Saturday 10 th March 2012 as per details below. Qualification            :   B.Sc / BCA / B.E / B Tech / MCA / Post Graduate Selection process   :   Technical Test (up to 4 years Relevant Experience) + Interviews Date : March 10, 2012 (Saturday)            Event   Location : Mumbai                          Time : 10am to 3pm Role      :  Developer     Skills     :   Java, JSP, Servlets with Struts /                    Springs / GWT   Work Location   : Mumbai   Relevant Exp     : 1 - 4 Yrs Venue : Oracle Financial Services Software Ltd, Oracle Park, Off Western Express Highway, Goregaon (East), Mumbai 400 063.   Contact Number : +91-22-6718 4000 Date : March 10, 2012 (Saturday)            Event   Location : Bangal...

Freeware / Free Software's 1 Jul 2010

Cloud Scanner Comodo Cloud Scanner (CCS) is an online service which can quickly and accurately identify malware, viruses, junk files, registry errors and hidden processes that may be lurking in a computer. Comodo Cloud Scanner audits all processes that are running on a computer then verifies them in real time with its 'live' database. Its features include: Detects malware and suspicious files, discovers privacy issues & identity traces, reveals corrupt, unwanted and invalid registry entries, Identifies junk files on a disk, and detects hidden processes running in a computer. Cloud Scanner, a small download, takes up minimal disk space and RAM, for Windows XP, Windows Vista, Windows 7, and Windows Server 2003/ 2008, can be downloaded at http://www.comodo.com/home/download/download.php?prod=cloud-scanner At a cost Comodo also offers 24/7 LivePCSupport, a tech support expert's service, to optimize a computer. Explorer++ Explorer++ is for power users and ...

Special Referral Campaign for Freshers!

namaskara, 2009 passout freshers ge udyoga avakaasha ide.  kelsakke bekagiruva vivara higide. idakke sari honduvaru iddare nanange  varrav22@yahoo.co.in nimma minche kaluhisi. The Process:   1.     Fill in the attached excel-sheet with the details of the candidates that you are referring – This is mandatory!   2.      And not to forget – They should be a B.E./M.Tech/MCA. The branches are – Computer Science, ECE, EEE, IT and they should be a 2009 or later pass out and should have got at least 70% or 7 CGPA   3.      There will be a written test of 2 hour duration consisting of – Quantitative, Problem Solving & Verbal Ability and a Technical test consisting of Java, Data Structures and C   4.      The cut-off date for sending the same is Tuesday COB 23-March-2010   5.      We will review the profiles and call the candidates for the written test scheduled for Saturday       Cheers! Varsha

DOT NET Interview Questions with Answers

When not to use Design Patterns? Do not use design patterns in any of the following situations. • When the software being designed would not change with time. • When the requirements of the source code of the application are unique. If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design. When to use Design Patterns? Design Patterns are particularly useful in one of the following scenarios. • When the software application would change in due course of time. • When the application contains source code that involves object creation and event notification. Benefits of Design Patterns: The following are some of the major advantages of using Design Patterns in software development. • Flexibility • Adaptability to change • Reusability What are Design Patterns? A Design Pattern essentially consists of a p...

Contact Form

Name

Email *

Message *