Sunday, 3 July 2011

ASP.net FAQ


  • What are different types of directives in ASP.Net and what is their usage?

  • What is view state and use of it? Where is ViewState information stored ?

  • What are user controls and custom controls?

  • What are the validation controls? What are the types?

  • Which two properties are there in all validation controls?

  • What's the difference between Response.Write() andResponse.Output.Write()?

  • What is mean by caching ? Give some example.

  • What’s a SESSION and APPLICATION object ?

  • Explain the differences between Server-side and Client-side code?

  • Difference between ASP and ASP.Net

  • In which event all the controls fully loaded in asp.net page?

  • What’s the use of @ Register directives?

  • What is AppSetting Section in “Web.Config” file ?

  • what is the difference between Web.config file and Machine.Config files?

  • What do you mean by authentication and authorization?

  • What is Data Binding?

  • How can you enable automatic paging in DataGrid ?

  • What’s difference between Server.Transfer andresponse.Redirect ?

  • How do you upload a file in ASP.NET ?

  • How to use "CSS" file in asp.net and what is the purpose?

  • What is mean by application domain and how to achieve it?

  • How do I initialize a TextBox whose TextMode is "password", with a password?

  • Describe the difference between inline and code behind.

  • What data types do the RangeValidator control support?

  • How to sort the data in Datagrid ? when we use DataBound event of Datagrid

  • What exactly happens when ASPX page is requested fromBrowser?

  • How does ASP.NET maintain state in betweensubsequent request ?

  • Explain the process of aspx.page life cycle in IIS

  • What is event bubbling?

  • How can you enable automatic paging in DataGrid ?

  • How do we get the clicked row value from data grid? what is the event used for that

  • What are HTTP modules and How to create a http handler for a http module

  • What’s difference between Authentication and authorization?

  • Can you explain in brief how the ASP.NET authentication process works?

  • What is impersonation in ASP.NET ?

  • What are the various ways of authentication techniquesin ASP.NET?

  • What’s difference between Datagrid , Datalist andrepeater ?

  • What’s the method to customize columns in DataGrid?

  • How can we check if all the validation control are valid and proper ?

  • What is Tracing in ASP.NET ? How do we enable tracing ?

  • How can we kill a user session ?

  • How do I send email message from ASP.NET ?

  • What are different IIS isolation levels?

  • How to use a checkbox in a datagrid?

  • What are different types of caching using cache object of ASP.NET?

  • Which various modes of storing ASP.NET session ?

  • What are the ways to maintain state ?

  • How many type of Types of authentications in IIS?

  • Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.

  • What are Master Pages?



  •  

    Java Websphere Interview questions


    Java Websphere Interview questions


    1. What is JACL


    2. DB2 Connection from WebSphere

    3. When using the WebSphere, Which three updates would force you to restart the test environment?


    4. Whats the difference between WAS5.x and WAS6.x.


    5. how to deploy web/jar files in Weblogic or tomcat in unix/Linux environment ?


    6. What is the difference between Web Server and Application Server ?


    7. What is Deployment Descriptors? How many types of Deployment Descriptors are available? What are they?


    8. What is a server?


    9. what is the differences between web sphere 4.0,5.0 and 6.0.


    10. In IBM WSAD, server crashes sometime while running in debug mode .Is there any way to prevent it ??

    11. How to implement JDBC-ODBC bridge driver (Type 1) in Websphere'??


    12. Is there any difference between Weblogic and Websphere application servers


    13. how to import jaxp package in ibm wsad5.1


    14. how to choose websphere other than any application server


    15. how many ways deployments in ibm websphere.please give me one examples


    16. what are the different appication servers and webservers supporting JAVA,.NET and VC++ Technologies


    17. What is the use of weblogic and web sphere.
    __________________


     

    Springs Java FAQ

    Spring Interview Questions


    1) Explain about spring applications framework?
    Spring architecture helps you to manage your business objects. Implementation part of the spring is easy because it helps you to introduce it in the middle of the objects. This framework is easy to implement in testing conditions. This is used by many large vendors.

    2) State some benefits and advantages of spring framework?
    Some of the benefits which spring can offer you are as follows: -
    • It is very beneficial for middle tier applications and it can be used in various run time environments.
    • Various custom properties need not be used in applications.
    • Cost can be reduced by reducing the programming to interface cost ratio.
    • Applications built on spring framework are easy to test.

    3) Explain about portability of spring?
    Spring applications and framework are portable between different servers. This framework and applications are portable between many different servers such as Tomcat, Jetty, Web Logic, Web Sphere, Resin, Geronimo, etc. Environment features can be implemented without affecting portability.

    4) Explain about Bean factory?
    Spring is designed to work with Java Beans and this forms the core part of the Spring Framework. This is a generic factory and it lets users and developers to enable objects by name. This helps to manage relationships between objects.

    5) Explain about the two models of the object which Bean Factory supports?
    Two models of object which bean factory supports are: -
    1) Single ton and prototype.
    Singleton has one instance (shared) with an object and it is assigned a specific name which can be retrieved on lookup.
    Prototype results in creation of an independent object.

    6) Explain about Bean definition Reader interface?
    Bean definition reader interface separates Bean factory implementations from metadata format. This is very useful if the application needs different metadata implementations. This framework or interface can be implemented in different ways.

    7) State about the commonly used Bean Factory definitions?
    The most commonly used bean factory definitions are as follows: -
    1) XML bean factory and 2) DefaultListable beanfactory.
    XMLbean factory is used to parse XML structure to define classes and properties of objects (named).
    DefaultListablebeanfactory is useful to program bean factories and parse definitions.

    8) Explain about inversion control behavior?
    Inversion control behavior is obtained through bean factory concept. The best part about this container is it can be coded in a single line and has simple deployment steps. Inversion of control behavior is very useful to avoid heavy containers such as EJB.

    9) Explain about dependency injection?
    Dependency injection is used to remove dependence of explicit coding on container. It resembles to a form of IoC. Java methods are chiefly used to inject dependencies into an object. It is used to collaborate and configure values into an object.

    10) Explain why an organization needs to implement spring framework?
    Spring framework is essential because it touches important aspects such as
    1) It is very useful to manage business objects
    2) Spring architecture is very flexible it regains its architecture even when you can take some parts of it.
    3) Testing part is very efficient and east to use.
    4) Vendors recognized its importance and they are using it for enterprise Java development.

    11) Explain about how to deploy applications using POJOs?
    Spring helps you to develop components using POJOs. Spring Framework takes care of your need to build enterprise applications. Infrastructure of your application should be away from the business logic because it can improve the pace of your business logic changes. This is provided by Springs Framework.

    12) Explain about auto wire support?
    When auto wire is used as an optional attribute it reduces the volume of configuration. Auto wire should be used on the root element and this is used to activate auto wiring for all beans. If you would like to add an additional constructor it can be populates without the need to change configuration.

    13) Explain the three different methods which are provided by the Namespace Handler interface?
    The three different methods which are provided by the name space handler interface are: -
    1) Init() is used to allow initialization for name space handler.
    2) BeanDefinition parse is used when a Spring encounters a top level element.
    3) BeanDefinitionHandler is used when spring encounters an attribute.

    14) Explain about the different ways in which Spring JDBC can help you?
    There are several ways in which a spring JDBC can help you they are: -
    1) Connection leaks can be avoided.
    2) Code can be focused on necessary SQL and it is very low.
    3) Applications will never have to depend on RDBMS error specification handling.
    4) You can easily implement DAO pattern without business logic.

    15) Explain about exception wrapping?
    Wrapping can be effectively done using spring. It makes the proprietary code to run in the ORM layer to a set of abstracted run time exceptions. Persistence exceptions can be easily handled. Handling of exceptions can be done very easily.

    16) Explain about transaction management in spring?
    Spring uses its own abstract for transaction management. It uses to deliver
    1) Programmatic transaction management through SimpleJdbcTemplate.
    2) Declarative transaction management is similar to EJB. It is compatible with superset of EJB CMT with some unique features.

    17) Explain about integration of spring with AspectJ?
    Spring integrates comfortably with AspectJ and this aspect makes it very poular. It makes it possible to include AspectJ aspects into Spring applications. Using Spring IoC container it is possible for dependency inject AspectJ. AspectJ is also used to inject non spring managed POJO using spring. It is uses XML and annotation driven pointcuts.

     

    Java Struts FAQ


    1. struts comes under which layer of three tire architecture in real time projects plz i need explaination?
    2. Difference between struts1.2 and struts2.0?
    3. is it possible to see actionservlet in my system. if yes how
    4. what is the difference between page and pageContext implicit variables
    5. Where can i get jar file for use the struts-tags in struts2?
    6. How can I make own ActionServlet? with example
    7. How do you customize ActionServlet?
    8. while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert
    9. In web.xml file instead of *.do can i write *.ibm, Specify with example
    10. If we close the browser,when the specific user session is active.Again if we open browse how to retrive it same user??what code i have to da???
    11. multiple instances for action class is it possible
    12. what is the difference between ServletContext and ServletConfig?
    13. Is Struts Action class Thread Safe?
    14. Which parser is used in Struts to parse the Structconfig.xml file.
    15. life cycle of struts?
    16. Is it possible to create mulitple instance of one Action Class in struts?
    17. can anyone help me to send the code for Jasper Reporting in java?plz
    18. How to explain Software Bank Loan descriptions
    19. why do we typecast ActionForm into our plain java bean class in Action class? What is the reason?
    __________________


     


  • How to forward from Array List to Jsp in Struts ActionServlet class?

  • what is the difference between SAX Parser and DOM Parser??

  • How data transfered from one formbean to another formbean?

  • What is Request Dispatcher and What is reuest Processor??

  • which MVC architecture struts follows and why?

  • where you will implement the tiles in struts?

  • its a ActionForm controller or model?

  • whats is mean Actionerrors and Actionerror?

  • how the error can be showed in the jsp page in struts?

  • what are the type of forward class in Struts?

  • who will run the execute method in struts?

  • how will you view ur jsp page to the client by using properties file?

  • what is mean by custom tag?

  • wahts the diif between Mvc1 and Mvc2?

  • what are the actions in struts?

  • what are tiles in struts?

  • how you implement and maintain your struts project by using MVC2 arch?

  • How is the Struts framworl related to MVC2?

  • what are componeents presents in Strutsconfig.xml?

  • what are the componenets of struts?

  • what r the disadvantages of MVC-2 Architecture?

  • struts is thread safe or not ?give me answer as early as possible

  • when connecting with the database,if database server is down,ho can we handle this exception in struts,how can we send error message to the user?

  • what is BUSINESS DELIGATE PATTERN,DAO,VO,DTO?

  • what is the disadvantages of using DynaActionForm in struts framework?

  • Is form beans are serializable or not?

  • what is the disadvantage of struts frame work?

  • project architechture in java

  • How to depoly your struts application in JBOSS

  • What are Struts properties?

  • In Struts Programming which is the controller,which is the model?

  • Wat is Difference between Mvc1 architecture and Mvc2 Architecture?

  • What is Request Dispatcher and what is Request Process?

  • What is Struts Frame Work Architecture(With Diagram) ?

  • what is the advantages and diadvantages of Struts?

  • How do you know what to give for the "path " under in struts-config.xml ?

  • Is struts thread safe?

  • What is difference between perform() used in struts1.0 and execute() used in 1.1 ?

  • How many types of action clases are there in stuts and their uses?

  • How to set email notification using struts.Plz give the example code?

  • How to create validations?what are struts validation components?

  • why servlet is used as controller not JSP?

  • How to pass runtime Parameter in Struts1.2?

  • how to create a search field in struts.with code

  • what is ForwardAction and IncludeAction in struts?

  • How Struts will follow the MVC?

  • What is MVC Architecture?

  • what is the purpose of action servlet and action?

  • what is tiles in struts?

  • what is frame work in struts?

  • What is the difference between a Strut and a Class?

  • Difference between JSF Framework and Struts Framework.



  •  

    JSP FAQ

    Q: What is a output comment? 
    A: A comment that is sent to the client in the viewable page source.The JSP engine handles an output comment as uninterpreted HTML text, returning the comment in the HTML output sent to the client. You can see the comment by viewing the page source from your Web browser.

    JSP Syntax
    <!-- comment [ <%= expression %> ] -->

    Example 1
    <!-- This is a commnet sent to client on
    <%= (new java.util.Date()).toLocaleString() %>
    -->

    Displays in the page source:
    <!-- This is a commnet sent to client on January 24, 2004 -->

    Q: What is a Hidden Comment?
    A: A comments that documents the JSP page but is not sent to the client. The JSP engine ignores a hidden comment, and does not process any code within hidden comment tags. A hidden comment is not sent to the client, either in the displayed JSP page or the HTML page source. The hidden comment is useful when you want to hide or "comment out" part of your JSP page.
    You can use any characters in the body of the comment except the closing --%> combination. If you need to use --%> in your comment, you can escape it by typing --%\>.
    JSP Syntax
    <%-- comment --%>

    Examples
    <%@ page language="java" %>
    <html>
    <head><title>A Hidden Comment </title></head>
    <body>
    <%-- This comment will not be visible to the colent in the page source --%>
    </body>
    </html>

    Q: What is a Expression?
    A: An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. Like
    <%= someexpression %>
    <%= (new java.util.Date()).toLocaleString() %>
    You cannot use a semicolon to end an expression

    Q: What is a Declaration? 

    A: A declaration declares one or more variables or methods for use later in the JSP source file.
    A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as they are separated by semicolons. The declaration must be valid in the scripting language used in the JSP file.

    <%! somedeclarations %>
    <%! int i = 0; %>
    <%! int a, b, c; %>



    Q: What is a Scriptlet? 

    A: A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language.Within scriptlet tags, you can
    1.Declare variables or methods to use later in the file (see also Declaration).

    2.Write expressions valid in the page scripting language (see also Expression).

    3.Use any of the JSP implicit objects or any object declared with a <jsp:useBean> tag.
    You must write plain text, HTML-encoded text, or other JSP tags outside the scriptlet.

    Scriptlets are executed at request time, when the JSP engine processes the client request. If the scriptlet produces output, the output is stored in the out object, from which you can display it.

    Q: What are implicit objects? List them?

    A: Certain objects that are available for the use in JSP documents without being declared first. These objects are parsed by the JSP engine and inserted into the generated servlet. The implicit objects re listed below
    request
    response
    pageContext
    session
    application
    out
    config
    page
    exception

    Q: Difference between forward and sendRedirect?
    A: When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completly with in the web container. When a sendRedirtect method is invoked, it causes the web container to return to the browser indicating that a new URL should be requested. Because the browser issues a completly new request any object that are stored as request attributes before the redirect occurs will be lost. This extra round trip a redirect is slower than forward.

    Q: What are the different scope valiues for the <jsp:useBean>?

    A: The different scope values for <jsp:useBean> are

    1. page
    2. request
    3.session
    4.application

    Q: Explain the life-cycle mehtods in JSP?
    A: THe generated servlet class for a JSP page implements the HttpJspPage interface of the javax.servlet.jsp package. Hte HttpJspPage interface extends the JspPage interface which inturn extends the Servlet interface of the javax.servlet package. the generated servlet class thus implements all the methods of the these three interfaces. The JspPage interface declares only two mehtods - jspInit() and jspDestroy() that must be implemented by all JSP pages regardless of the client-server protocol. However the JSP specification has provided the HttpJspPage interfaec specifically for the JSp pages serving HTTP requests. This interface declares one method _jspService().
    The jspInit()- The container calls the jspInit() to initialize te servlet instance.It is called before any other method, and is called only once for a servlet instance.
    The _jspservice()- The container calls the _jspservice() for each request, passing it the request and the response objects.
    The jspDestroy()- The container calls this when it decides take the instance out of service. It is the last method called n the servlet instance.




    Q: How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
    A: You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your JSP pages to prevent them from being cached at the browser. You need both the statements to take care of some of the older browser versions.
    <%
    response.setHeader("Cache-Control","no-store"); //HTTP 1.1
    response.setHeader("Pragma\","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
    %>

    Q: How does JSP handle run-time exceptions? 
    A: You can use the errorPage attribute of the page directive to have uncaught run-time exceptions automatically forwarded to an error processing page. For example:
    <%@ page errorPage=\"error.jsp\" %> redirects the browser to the JSP page error.jsp if an uncaught exception is encountered during request processing. Within error.jsp, if you indicate that it is an error-processing page, via the directive: <%@ page isErrorPage=\"true\" %> Throwable object describing the exception may be accessed within the error page via the exception implicit object. Note: You must always use a relative URL as the value for the errorPage attribute.

    Q: How can I implement a thread-safe JSP page? What are the advantages and Disadvantages of using it?
    A: You can make your JSPs thread-safe by having them implement the SingleThreadModel interface. This is done by adding the directive <%@ page isThreadSafe="false" %> within your JSP page. With this, instead of a single instance of the servlet generated for your JSP page loaded in memory, you will have N instances of the servlet loaded and initialized, with the service method of each instance effectively synchronized. You can typically control the number of instances (N) that are instantiated for all servlets implementing SingleThreadModel through the admin screen for your JSP engine. More importantly, avoid using the tag for variables. If you do use this tag, then you should set isThreadSafe to true, as mentioned above. Otherwise, all requests to that page will access those variables, causing a nasty race condition. SingleThreadModel is not recommended for normal use. There are many pitfalls, including the example above of not being able to use <%! %>. You should try really hard to make them thread-safe the old fashioned way: by making them thread-safe .

     

    Advanced Java


  • JMS based on what technology?

  • Is 'synchronised' a modifier?

  • In RMI, inorder to sent the stub reference to the client, is we have to load the server object first into the memory or can we directly sent reference to the client?

  • What is the need of serialize?

  • How to pass parameters in RMI?

  • How to implement RMI in Java?

  • How to deploy Jar, War files in J2EE?

  • How two threads will communicate with each other?

  • How primary key is implemented in Oracle?

  • What are the types of data passing mechanisams under JMS specification?

  • How many requests can a server fetch at a time?

  • Howmany interfaces are used in RMI?

  • How JNDI is used in JMS ?

  • Explain about thread synchronization inside a monitor?

  • On a computer that having single CPU, how multithreading concept can be achieved?

  • How do you download stubs from a Remote place?

  • What are JTA/JTS and how they used by client?

  • Have you used threads in Servelet?

  • What are skeletons and stubs and how they are generated?

  • What is the priority of Garbage collector thread?

  • Tell me about Firewalls in RMI?

  • Explain the methods of Naming class, rebind( ) and lookup()?

  • Explain lazy activation?

  • How database connectivity in XML is achieved?

  • Define the remote object implementation?

  • Define the remote interface?

  • If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

  • If we opened windows notepad 4 times, does it starts 4 processes or 4 threads?

  • Explain the steps in details to load the server object dynamically?

  • Can a thread be a member of another thread?

  • Where we can write Rmi registry in the code, without having to write it at the command prompt?

  • What is MOM?

  • What is DTD?

  • What is waiting state? In what ways a thread can enter into waiting state?

  • what is Static binding?

  • How a component can be placed on Windows?

  • How to determine SGA site?

  • How can a dead thread be restarted?

  • How to determine applet?s height and width?

  • What is source and listener?

  • What is a layout manager?

  • Differences between applications and applets?

  • What are different types of layout managers in java.awt package?

  • What are different types of controls in AWT?

  • How do you set security in applets?

  • What is the lifecycle of an applet?

  • What is an applet?

  • What is codebase in applet?

  • How many ways can a thread be used?

  • What is multithread synchronizing ?

  • How is serialization used generally ?



  •  

    Core Java


  • How the elements are organized in BorderLayout?

  • How to avoid the runtime exception ?

  • What is deadlock and how to avoid this?

  • How to add and remove nodes in Jtree?

  • Can applet in different page/s communicate with each other?

  • Can an unreachable object become reachable again?

  • How you can create a radio buttion using Checkbox class?

  • How GUI component handle its own events?

  • Without creating a new object, How you can retrieve a String or other object?

  • How are this() and super() used with constructors?

  • How are this and super used?

  • How the elements are organized in GridLayout?

  • Can you declare a static variable in a method?

  • Can you call a constructor within a constructor?

  • Can we declare variables inside a method as Final Variables?

  • How the elements are organized in GridBagLayout?

  • Howmany address lines are required to addressing 1 MB memory?

  • What is lazy activation?

  • Explain about Superclass and Subclass?

  • Explain Stream Tokenizer?

  • Explain Event handling in AWT?

  • what are ER diagrams?

  • Does java support multi dimensional arrays ?

  • Does garbage collection guarantee that a program will not run out of memory?

  • Difference between String & StringBuffer

  • Difference between Interface & Abstract class?

  • Can an anonymous class be declared as implementing an interface and extending a class?

  • Can an abstract class be final?

  • Can a lock be acquired on a class?

  • Difference between Applet & Application?

  • Difference between canvas class & graphics class?

  • Define Compiling?

  • What is the default modifier in Interface?

  • What will happens if you opened Internet Explorer 4 times?

  • what are Checked & Unchecked exceptions ?

  • Can you run the product development on all operating systems ?

  • Can you have an inner class inside a method and what variables can you access?

  • Can you have a constructor in abstract class?

  • Can you extend more than one interface?

  • Can we access a database using applets?

  • Can try statements be nested?

  • Can an exception be rethrown?

  • Can Applet have constructors?

  • As a developer what steps do you take to improve the performance?

  • Does 'true' and 'false' are keywords?

  • Explain about global variables in Java?

  • How are commas used in the initialization and iteration parts of a for statement?


  • Can a Byte object be cast to a double value?

  • What is static binding and where it occurs?

  • what is Remote Reference Layer ?

  • What is file class and what is its purpose?

  • Explain Public static void main?

  • Name two subclasses of the TextComponent class?

  • What are teh sub-classes of a component class?

  • What are the names of Component subclasses that support painting?

  • What primitive Java types? Howmany are they and what are their names?

  • What are the names of interfaces that doesn't consists of method/s ?

  • Can you give names of Container classes?

  • What classes can be used to store arbitrary number of objects ?

  • Explain Connection Pooling?

  • Are there any tools available in java to create reports?

  • Does any tag exists in HTML to upload and download files ?

  • Is 'sizeof' a keyword?

  • Is 'null' a keyword?

  • Is multiple inheritance allowed in Java? Why ?

  • Are nested try statements are possible?

  • A class can be a subclass of itself?

  • Is &&= a valid Java operator?

  • What are Inner classes?

  • Name the package that most of the AWT events that supports event-delegation model are defined?

  • How to display names of all components in a Container?

  • What we have to do, when we don't want to implement all methods of an interface?

  • How to re-get an object that is collected by garbage collector?

  • How to access a variable if it is declared as private?

  • How to access a method that it declared as protected?

  • How can a class be accessed, If no access modifiers are declared?

  • How to add panel to a Frame?

  • How to prevent a field from serialization ?

  • How to know the host from which Applet is originated?

  • What method is used to compare two strings ?

  • How applets will communicate with each other?

  • How many times garbage collector will invoke an object?s finalize() method?

  • How can you take string into InputStream?

  • How can you reverse a string?

  • How to transfer data from an Applet to Servlet ?

  • How to print nodes of a Binary tree?

  • Can an object?s finalize() method be invoked while it is reachable?

  • Can an object be garbage collected while it is still reachable?

  • How to implement a multithreaded applet?

  • How to find the length and capacity of a string buffer ?

  • How can you eliminate duplicates?

  • How can you debug the Java code?

  • How to convert a string to long?

  • How to connect to a remote database using Applet?

  • explain about casting of objects?

  • What are parent methods and how can you call them?

  • How the elements are organized in CardLayout?




  •