java -ms32m -mx128m for resizing the JVM heap space.

1. What is EJB EJB stands for Enterprise JavaBean and is a widely-adopted server side component architecture for J2EE. It enables rapid development of mission-critical application that are versatile, reusable and portable across middleware while protecting IT investment and preventing vendor lock-in. 2. What is session Facade? Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. It increases the performance over the network. In this case we call session bean which on turn call entity bean. 3. What is EJB role in J2EE? EJB technology is the core of J2EE. It enables developers to write reusable and portable server-side business logic for the J2EE platform. 4. What is the difference between EJB and Java beans? EJB is a specification for J2EE server, not a product; Java beans may be a graphical component in IDE. 5. What are the key features of the EJB technology? 1. EJB components are server-side components written entirely in the Java programming language 2. EJB components contain business logic only - no system-level programming & services, such as transactions, security, life-cycle, threading, persistence, etc. are automatically managed for the EJB component by the EJB server. 3. EJB architecture is inherently transactional, distributed, portable multi-tier, scalable and secure. 4. EJB components are fully portable across any EJB server and any OS. 5. EJB architecture is wire-protocol neutral–any protocol can be utilized like IIOP,JRMP, HTTP, DCOM,etc. 6. What are the key benefits of the EJB technology? 1. 2. 3. 4. Rapid application development Broad industry adoption Application portability Protection of IT investment

7. How many enterprise beans? There are three kinds of enterprise beans: 1. session beans, 2. entity beans, and 3. message-driven beans.

8. What is message-driven bean? A message-driven bean combines features of a session bean and a Java Message Service (JMS) message listener, allowing a business component to receive JMS. A message-driven bean enables asynchronous clients to access the business logic in the EJB tier. 9. What is Entity Bean and Session Bean ? Entity Bean is a Java class which implements an Enterprise Bean interface and provides the implementation of the business methods. There are two types: Container Managed Persistence(CMP) and Bean-Managed Persistence(BMP). Session Bean is used to represent a workflow on behalf of a client. There are two types: Stateless and Stateful. Stateless bean is the simplest bean. It doesn’t maintain any conversational state with clients between method invocations. Stateful bean maintains state between invocations. 10. How EJB Invocation happens? Retrieve Home Object reference from Naming Service via JNDI. Return Home Object reference to the client. Create me a new EJB Object through Home Object interface. Create EJB Object from the Ejb Object. Return EJB Object reference to the client. Invoke business method using EJB Object reference. Delegate request to Bean (Enterprise Bean). 11. Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB? You can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable.This has to be consider as passed-by-value, that means that it’s read-only in the EJB. If anything is altered from inside the EJB, it won’t be reflected back to the HttpSession of the Servlet Container.The pass-byreference can be used between EJBs Remote Interfaces, as they are remote references. While it is possible to pass an HttpSession as a parameter to an EJB object, it is considered to be bad practice in terms of object-oriented design. This is because you are creating an unnecessary coupling between back-end objects (EJBs) and front-end objects (HttpSession). Create a higher-level of abstraction for your EJBs API. Rather than passing the whole, fat, HttpSession (which carries with it a bunch of http semantics), create a class that acts as a value object (or structure) that holds all the data you need to pass back and forth between frontend/back-end. Consider the case where your EJB needs to support a non HTTPbased client. This higher level of abstraction will be flexible enough to support it. 12. The EJB container implements the EJBHome and EJBObject classes. For every request from a unique client, does the container create a separate instance of the generated EJBHome and EJBObject classes? The EJB container maintains an instance pool. The container uses these instances for the EJB Home reference irrespective of the client request. while refering the EJB Object classes the container creates a separate instance for each client request. The instance pool maintenance is up to the implementation of the container. If the container provides one, it is available otherwise it is not mandatory for the provider to implement it. Having said that, yes most of the container providers implement the pooling functionality to increase the performance of the application server. The way it is implemented is, again, up to the implementer.

13. Can the primary key in the entity bean be a Java primitive type such as int? The primary key can’t be a primitive type. Use the primitive wrapper classes, instead. For example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class, not a primitive). 14. Can you control when passivation occurs? The developer, according to the specification, cannot directly control when passivation occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is inside a transaction. So using transactions can be a a strategy to control passivation. The ejbPassivate() method is called during passivation, so the developer has control over what to do during this exercise and can implement the require optimized logic. Some EJB containers, such as BEA WebLogic, provide the ability to tune the container to minimize passivation calls. Taken from the WebLogic 6.0 DTD -The passivation-strategy can be either default or transaction. With the default setting the container will attempt to keep a working set of beans in the cache. With the transaction setting, the container will passivate the bean after every transaction (or method call for a non-transactional invocation). 15. What is the advantage of using Entity bean for database operations, over directly using JDBC API to do database operations? When would I use one over the other? Entity Beans actually represents the data in a database. It is not that Entity Beans replaces JDBC API. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is created the container automatically retrieves the data from the DB/Persistance storage and assigns to the object variables in bean for user to manipulate or use them. For this the developer needs to map the fields in the database to the variables in deployment descriptor files (which varies for each vendor). In the Bean Managed Entity Bean - The developer has to specifically make connection, retrive values, assign them to the objects in the ejbLoad() which will be called by the container when it instatiates a bean object. Similarly in the ejbStore() the container saves the object values back the the persistance storage. ejbLoad and ejbStore are callback methods and can be only invoked by the container. Apart from this, when you use Entity beans you dont need to worry about database transaction handling, database connection pooling etc. which are taken care by the ejb container. 16. What is EJB QL? EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence. EJB QL is introduced in the EJB 2.0 specification. The EJB QL query language defines finder methods for entity beans with container managed persistenceand is portable across containers and persistence managers. EJB QL is used for queries of two types of finder methods: Finder methods that are defined in the home interface of an entity bean and which return entity objects. Select methods, which are not exposed to the client, but which are used by the Bean Provider to select persistent values that are maintained by the Persistence Manager or to select entity objects that are related to the entity bean on which the query is defined. 17. Brief description about local interfaces?

rather than processing a serialized sequence of method calls. the long-term costs of these choices. Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. to allow streamlined calls to the bean if a caller is in the same container. While EJB 2. However. that is. in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence. and finally. What is the difference between Message Driven Beans and Stateless Session beans? In several ways. What are the special design care that must be taken when you work with local interfaces? It is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. 18. and later extended to support to standard CORBA transport for these calls using RMI/IIOP. 20.EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario. the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances. In case of stateful session bean. This does not involve the overhead involved with RMI like marshalling etc. With this feedback in mind. message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously. instances cannot be created or removed as a result of client requests or other API calls. the bean may be kept in cache till either the session times out. 22. This facility will thus improve the performance of applications in which co-location is planned. the EJB 2. while local interfaces use call-byreference. and was a strong feature in support of a goal of component reuse in J2EE. remote interfaces pass parameters using call-by-value semantics. some or all of their EJB calls are between beans in a single container.0 expert group has created a local interface mechanism. Many developers are using EJBs locally. This means that in order to use local interfaces safely. Message-driven beans have no home or remote interface. How can I call one EJB from inside of another EJB? . and therefore cannot be directly accessed by internal or external clients. The local interface may be defined for a bean during development. For example. which exist only for the duration of a particular method call. Clients interact with messagedriven beans only indirectly. develop the application code with these choices in mind. What happens if remove( ) is never invoked on a session bean? In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. by sending a message to a JMS Queue or Topic. then decide which interfaces can be local and which remote. 19.0 local interfaces are extremely useful in some situations. application developers need to carefully consider potential deployment scenarios up front. The Container maintains the entire lifecycle of a message-driven bean. The number of beans in cache is managed by the container. need to be factored into the design decision. especially when changing requirements and component reuse are taken into account.

EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth. 23. What is an EJB Context? EJBContext is an interface that is implemented by the container, and it is also a part of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the client using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more details. 24. Is is possible for an EJB client to marshal an object of class java.lang.Class to an EJB? Technically yes, spec. compliant NO! - The enterprise bean must not attempt to query a class to obtain information about the declared members that are not otherwise accessible to the enterprise bean because of the security rules of the Java language 25. Is it legal to have static initializer blocks in EJB? Although technically it is legal, static initializer blocks are used to execute some piece of code before executing any constructor or method while instantiating a class. Static initializer blocks are also typically used to initialize static fields which may be illegal in EJB if they are read/write - In EJB this can be achieved by including the code in either the ejbCreate(), setSessionContext() or setEntityContext() methods. 26. Is it possible to stop the execution of a method before completion in a SessionBean? Stopping the execution of a method inside a Session Bean is not possible without writing code inside the Session Bean. This is because you are not allowed to access Threads inside an EJB. 27. What is the default transaction attribute for an EJB? There is no default transaction attribute for an EJB. Section 11.5 of EJB v1.1 spec says that the deployer must specify a value for the transaction attribute for those methods having container managed transaction. In WebLogic, the default transaction attribute for EJB is SUPPORTS. 28. What is the difference between session and entity beans? When should I use one or the other? An entity bean represents persistent global data from the database; a session bean represents transient user-specific data that will die when the user disconnects (ends his session). Generally, the session beans implement business methods (e.g. Bank.transferFunds) that call entity beans (e.g. Account.deposit, Account.withdraw) 29. Is there any default cache management system with Entity beans ?

In other words whether a cache of the data in database will be maintained in EJB ? - Caching data from a database inside the AAApplication Server are what Entity EJB’s are used for.The ejbLoad() and ejbStore() methods are used to synchronize the Entity Bean state with the persistent storage(database). Transactions also play an important role in this scenario. If data is removed from the database, via an external application - your Entity Bean can still be alive the EJB container. When the transaction commits, ejbStore() is called and the row will not be found, and the transaction rolled back. 30. Why is ejbFindByPrimaryKey mandatory? An Entity Bean represents persistent data that is stored outside of the EJB Container/Server. The ejbFindByPrimaryKey is a method used to locate and load an Entity Bean into the container, similar to a SELECT statement in SQL. By making this method mandatory, the client programmer can be assured that if they have the primary key of the Entity Bean, then they can retrieve the bean without having to create a new bean each time - which would mean creating duplications of persistent data and break the integrity of EJB. 31. Why do we have a remove method in both EJBHome and EJBObject? With the EJBHome version of the remove, you are able to delete an entity bean without first instantiating it (you can provide a PrimaryKey object as a parameter to the remove method). The home version only works for entity beans. On the other hand, the Remote interface version works on an entity bean that you have already instantiated. In addition, the remote version also works on session beans (stateless and stateful) to inform the container of your loss of interest in this bean. 32. How can I call one EJB from inside of another EJB? EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface of the other bean, then acquire an instance reference, and so forth. 33. What is the difference between a Server, a Container, and a Connector? An EJB server is an application, usually a product such as BEA WebLogic, that provides (or should provide) for concurrent client connections and manages system resources such as threads, processes, memory, database connections, network connections, etc. An EJB container runs inside (or within) an EJB server, and provides deployed EJB beans with transaction and security management, etc. The EJB container insulates an EJB bean from the specifics of an underlying EJB server by providing a simple, standard API between the EJB bean and its container. A Connector provides the ability for any Enterprise Information System (EIS) to plug into any EJB server which supports the Connector architecture. See Sun’s J2EE Connectors for more in-depth information on Connectors. 34. How is persistence implemented in enterprise beans? Persistence in EJB is taken care of in two ways, depending on how you implement your beans: container managed persistence (CMP) or bean managed persistence (BMP) For CMP, the EJB container which your beans run under takes care of the persistence of the fields you have declared to be persisted with the database this declaration is in the deployment descriptor. So, anytime you modify a field in a CMP bean, as soon as the method you have executed is finished, the new data

is persisted to the database by the container. For BMP, the EJB bean developer is responsible for defining the persistence routines in the proper places in the bean, for instance, the ejbCreate(), ejbStore(), ejbRemove() methods would be developed by the bean developer to make calls to the database. The container is responsible, in BMP, to call the appropriate method on the bean. So, if the bean is being looked up, when the create() method is called on the Home interface, then the container is responsible for calling the ejbCreate() method in the bean, which should have functionality inside for going to the database and looking up the data. 35. What is an EJB Context? EJBContext is an interface that is implemented by the container, and it is also a part of the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext. Session beans use a subclass called SessionContext. These EJBContext objects provide the bean class with information about its container, the client using the bean and the bean itself. They also provide other functions. See the API docs and the spec for more details. 36. Is method overloading allowed in EJB? Yes you can overload methods Should synchronization primitives be used on bean methods? - No. The EJB specification specifically states that the enterprise bean is not allowed to use thread primitives. The container is responsible for managing concurrent access to beans at runtime. 37. Are we allowed to change the transaction isolation property in middle of a transaction? No. You cannot change the transaction isolation level in the middle of transaction. 38. For Entity Beans, What happens to an instance field not mapped to any persistent storage, when the bean is passivated? The specification infers that the container never serializes an instance of an Entity bean (unlike stateful session beans). Thus passivation simply involves moving the bean from the ready to the pooled bin. So what happens to the contents of an instance variable is controlled by the programmer. Remember that when an entity bean is passivated the instance gets logically disassociated from it’s remote object. Be careful here, as the functionality of passivation/activation for Stateless Session, Stateful Session and Entity beans is completely different. For entity beans the ejbPassivate method notifies the entity bean that it is being disassociated with a particular entity prior to reuse or for dereference. 39. What is a Message Driven Bean, what functions does a message driven bean have and how do they work in collaboration with JMS? Message driven beans are the latest addition to the family of component bean types defined by the EJB specification. The original bean types include session beans, which contain business logic and maintain a state associated with client sessions, and entity beans, which map objects to persistent data. Message driven beans will provide asynchrony to EJB based applications by acting as JMS message consumers. A message bean is associated with a JMS topic or queue and receives JMS messages sent by EJB clients or other beans. Unlike entity beans and session beans, message beans do not have home or remote interfaces.

Then.Instead.2 support the dynamic class loading. after some time. The message bean’s implementation of this method contains the business logic required to process the message. The container uses these instances for the EJB Home reference irrespective of the client request. message beans maintain no client-specific state. yes most of the container providers implement the pooling functionality to increase the performance of the application server. but has not been yet synchronized or assigned to an EJBObject. Like stateless session beans. To receive JMS messages. Popularity: 40% [?] . which defines a single onMessage() method. to save additional memory. but they can be used only for serving Home methods (create or findBy). If the container provides one. the container will. while refering the EJB Object classes the container creates a separate instance for each client request. in fact. it is available otherwise it is not mandatory for the provider to implement it. so. Having said that. This mean that the instances do represent entity beans. Does the container create a separate instance of the generated EJBHome and EJBObject classes? The EJB container maintains an instance pool. in such cases. and calls its onMessage method passing the client’s message as the single argument. exactly the same. the bean still takes up some memory just being in the Pooled State. the container ensures that a message bean corresponding to the message topic/queue exists (instantiating it if necessary). All these instances are. allowing the container to optimally manage a pool of message-bean instances. 42. since those methods do not relay on the specific values of the bean. When a message arrives. message driven beans are instantiated by the container as required. This similarity is a fundamental design goal of the JMS capabilities of the new specification. For every request from a unique client. because even though the bean’s cache has been cleared. Note that session beans and entity beans are not allowed to function as message beans. 40. Clients send JMS messages to message beans in exactly the same manner as they would send messages to any other JMS destination. Therefore. The way it is implemented is again up to the implementer. The JDK 1.jms. What is the advantage of putting an Entity Bean instance from the Ready State to Pooled state The idea of the Pooled State is to allow a container to maintain a pool of entity beans that has been created. The instance pool maintainence is up to the implementation of the container. move the entity bean from the Ready State to the Pooled state to save memory. Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP connection in the same way as RMI does across a JRMP connection? Yes. Jon Thorarinsson has also added: It can be looked at it this way: If no client is using an entity bean of a particular type there is no need for cachig it (the data is persisted in the database).MessageListener interface. message driven beans implement the javax. 41. The EJB container implements the EJBHome and EJBObject classes. they do not have meaningful state. the container may begin moving entity beans from the Pooled State to the Does Not Exist State.

What major patterns do the Java APIs utilize? 18. When would I use the delegation pattern instead of inheritance to extend a class’s behavior? 20. What is an analysis pattern? 2. What are Anti-Patterns? 11. What are Collaboration Patterns? 24. How can I maintain a single instance of an object in an applet? 26. Is there some kind of Design pattern which would make it possible to use the Same code base in EJB and non EJB context? 28. Why is the study of patterns important? 13. Is it correct from a design point of view to make an object both an Observer and Observable at the same time? 25.e. How and where did the concept of design patterns get started? 9.getInstance(). How can I implement the MVC design pattern using JSP? Popularity: 62% [?] Share This Struts Interview questions » By Admin on Oct 2. Can somebody explain why is it so? 17. Where can I find good examples of the Prototype pattern? 10. How can I make sure at most one instance of my class is ever created? 19. 2007 in Java System Design & Analysis Patterns Interview Qu | 0 Comments 1. 2007 in Struts Interview questions | 0 Comments Is Struts threadsafe? . What is an example of a design pattern? 16. What is the best way to generate a universally unique object ID? Do I need to use an external resource like a file or database. What is a software design pattern? 12.. What are the differences between analysis patterns and design patterns? 3. What is the Reactor pattern? 7. 5. or can I do it all in memory? 27. How do I document a design pattern? 14. How do you write a Thread-Safe Singleton? 6. What is session facade? 29. Which patterns were used by Sun in designing the Enterprise JavaBeans model? 21. How does “Extreme Programming” (XP) fit with patterns? 4. Calendar is an abstract class. What are Process Patterns? 8.Share This Java System Design & Analysis Patterns Interview Questions » By Admin on Nov 4. This looks Non-OO? Ex: Calendar a=Calendar. What is the disadvantage of using the Singleton pattern? It is enticing to use this pattern for all the classes as it makes it easy to get the reference of the singleton object. parent instantiating a derived class. How is JDO different from VO ? 30. Where can I learn more about design patterns? 15. What patterns are particularly useful in building networked applications? 22. Are there any good Java-specific patterns books available? 23. The getInstance() method tries to instantiate GregorianCalendar() i.

2. For example: banking org.struts.Tags for accessing JavaBeans and their properties. 3. What are the various Struts Tag libraries? Struts provide many tag libraries to ease the development of web applications.action. /WEB-INF/struts-authentication.xml.xml. text boxes. rather than individual servlet.Yes 1. iteration capabilities and flow management * Tiles or Template tag library . Response is handled by light-weight Action object.ActionServlet < init-param > config /WEB-INF/struts-config. 3. * Logic tag library . 2007 in Websphere Interview Questions | 0 Comments How to choose websphere over other application servers? .apache. Multiple configuration files in Struts: Struts can use multiple configuration files.For using the nested beans in the application What is ActionMapping? 1. 2. including forms. checkboxes. This conserves resources and provides best throughput. * HTML tag library .xml 1 < / servlet > Popularity: 100% [?] Share This Websphere Interview Questions » By Admin on Oct 2.Tags to output standard HTML. radio buttons etc. Defines a list of local forwards that are visible only to this action. These tag libraries are: * Bean tag library . It can contain reference to a form bean that the action can use. Associates an action name with an action. /WEB-INF/struts-help.For the application using tiles * Nested tag library . Servlet instantiates Action class once and allows other requests to be threaded through the original object..Tags for generating conditional output.

How to import jaxp package in IBM WSAD? 1. Transaction. 3. Supports deployment of . How to implement JDBC-ODBC bridge driver (Type 1) in Websphere? If you use JDBC type (I) driver you dont need to add any driver in websphere. if you use Type(2) and Type(4) so first go to admin console then go to connection. 4. For example. highly availability. use websphere specific ant tasks and building automated scripts for deploying application. Webserver: handles HTTP protocol. and initialization parameters. it responds with an HTTP response. It depends on several facots: 1. clustering. What is the difference between web server and application server? ApplicationServer: takes care of Security. There are two types of deployment descriptor in websphere: Web application deployment descriptor and portlet deployemnt descriptor Portlets are packaged as WAR files with a web application deployment descriptor (web. 2.ear filesApplication server = webserver + EJB container. Resource pooling.xml). possibly including HTTP. 5. Corporate standards Budget.war and . same we use java class. Directly copy files to deployedapplication folder in websphere. Exposes business logic to client applications through various protocols. Multithreading. This defines each portlet as a servlet within the web application. load balancing. 2. How many ways can you deploy applications in websphere? 1. What are deployment descriptors? How many types of Deployment descriptors are available? What are they? Deployment descriptor is an XML file that describes how to deploy a module or application by specifying configuration and container options. External systems your application will be interacting Type of application you have Target availability of system. scalability. you simply created DSN and use it locally. Receives HTTP request. through administration console. the portlet class. 3. etc. including unique identifiers for each portlet. an EJB deployment descriptor passes information to an EJB container about how to manage and control an enterprise bean.hot deployment. 4. performence. 3. then add . 5.Selecting application server is part of architechtural process when infrastructure is defined. 2. open WSAD go to project click properties select javaBuildPath add any jar file like jaxp select add external jars.

you need to append the session Id for each and every link that is part of your servlet response. instead of a single instance of the servlet generated for your JSP page loaded in memory. max conn. via the directive: . URL rewriting includes the sessionID within the link itself as a name/value pair. JSP Interview Questions » By Admin on Oct 2. and if you are using redirection. and connect it to you applications. uname pass. but websphere does not have any default transaction attribute. . it has rich implementation of J2EE. size. it does not scale well.driver there fill other info like conn. This is done by adding the directive withi n your JSP page. Execute the following . . In terms of trnsaction weblogic is having default transaction attribute as ’supports’. adding sessionId to a link is greatly simplified by means of a couple of methods: response. For example: There are six JSP Actions: . and works well for low volume sites. How do I prevent the output of my JSP or servlet pages from being caches by the browser? Set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. the input URL is returned unchanged since the session ID wil lbe persisted as cookie. JSps can be made thread safe by having them implement the SingleThreadModel interface. * Consist of typical (XML-base) prefix of ‘jsp’ followed by a colon. What is the difference between and forwards request to dbaccessError.encodeRedirectURL() can be used by giving the redirected URL as input. you must indicate that it is an error processing page. for this to be effective. is so. with the service method of each instance effectively synchronized. How can you enable session tracking for JSP pages if the browser has disabled cookies: We can enable session tracking using URL rewriting. better performance.jsp”. more extensive integration and transaction management. Which is better fro threadsafe servlets and JSPs? SingleThreadModel Interface or Synchronization? Although the SingleThreadModel technique is easy to use.ecnodeURL() associates a session ID with a giver UIRl.jsp pge if an uncaught exception is encountered during request processing. response. 2007 | In JSP Interview Questions | No Comments » JSP Action: * JSP actions are XML tags that direct the server to use existing components or control the behavior of the JSP engine. Both encodeURL() and encodeRedirectURL() first determine whether cookies are supported by the browser. . . With this. However. Within “dbaccessError. you will have N instance of the servlet loaded and initialized. Is there any difference between weblogic and websphere? Webpshere tends to focus more on integration. followed by the action name followed by one or more attribute parameters. connectivity and web services.

and transition. Life cycle is divided into phases. object diagram. Dependencies: relationship between two entities such that a change in specification of one thing may affect the other. SDLC: Software development life cycle. activity diagram. What are the major three types of modeling used? They are 9: Use case diagram. Implementation. helps document the sytem. What is modeling? What are the advantages of creating a model? Well-accepted engineering technique which helps build a model. deployment diagram. What are the different views considered when building an object-oriented software system? there aer 5 veiws: 1. Elaboration. constructing and documenting the artifacts of the system. implementation veiw: addressing the physical implementation of the system. used to show that one class uses another class as an argument in the signature of the operation. 2007 | In UML interview questions | 1 Comment » What is UML? Graphical language for visualizing. deployement view: focus on the modeling of components required for deploying the system. construction. . What are relationships? 1. before physically implementing the system. class diagram. statechart diagram. Model is the simplification of reality. architecture centric and iterative and incremental. Requirement gathering. allows to create blueprints of all the aspects of the system. 5. Model helps you visualize the system. Testing. Supporting workflows are configuration and change management. SDLC of a system includes processes that are Use case driven. Analysis and Design. component diagram. Deployment. sequence diagram. Use case view: exposes requirements of a system. Phase is a time span between two milestones. helps make templates for constructing the system. specifying. collaboration diagram. blueprint of the system that needs to be built. 2. 4. process view: modeling the distribution of the sytems processes and threads. Design view: capturing the vocabulary 3. Popularity: 70% [?] Share This UML interview questions » By Admin on Oct 2. The milestones are Inception. Project management.scriptlet at the beginning of JSP pages to prevent them from being caches at the browser. Process workflows that evolve through these phase are Business Modelling. helps to specify the structural and behaviour of the sytem.

servlet. * Static Diagrams (Structural diagrams): Class diagram. Popularity: 53% [?] Share This Servlet Interview Questions » By Admin on Oct 2. Child refrerence exists even if parent oject rereference is set to null.Servlet interface defines 3 methos known as life-cycle method. 3. statechart diagram. Generalization: relationships specified in the class subclass scenario.google. then initialized with the init() method. it is shown when one entity inherits from other. Aggregation: One class owns but shares a reference to objects of another class. component diagram. A request string for doGet() looks like the following: http://www. ServletResponse res) throws ServletException. All parameters are . It is used to create new model elements or derive from existing ones having specific properties pertaining to problem domain. and doPost() mehtod doesn’t have this limitation. Aggregation: type of association where there is-a. ‘A room has walls’. activity diagram. public void init(ServletConfig config) throws ServletException: servlet is constructe. 3. What is the difference between doGet() and doPost()? doGet() mthod is limited with 2k of data to be sent. <>. Involves the interaction of actors and system. Messages: Specification of a communication. Stereotype: Extension to existing UML vocabulary. doPost() method call doesntneed a long texttail after a servlet name in a request. sequence diagram. Composition: one class contains objects of another class. Symbol: empty diamond arrow. public void destroy(): Servlet is removed from service. IOException: any request from client are handled initially by the service() method before delegating to the doXxx() methods in the case of HttpServlet. destroyed with the destroy() method. has-a relationship. deployment diagram. Associations: structural relationships. ‘Person works for a company’. Symbol: filled diamond arrow. 2. when a message is passed that results in action that is in turn an executable statement. child reference does not exists independently. public void service(ServletRequest req. 4. * Dynamic diagram(Behavioral diagrams): Use case diagram.com/svt1?p1=v1&p2=v2&…&pN=vN.2. 2007 | In Servlet interview questions | No Comments » The java. collaboration diagram. EG: you can create steriotype. Object diagram. 1. <> derived from existing one. Use Case: specifies the behavior of a system or a part of a system. then garbage collected and finalized.

It is created to pass initialization infomation to the servlet. Inheritance allows well-tested procedures to be reused and enables changes to make once and have effect in all relevant places. HttpServlet and GenericServlet: GenericServlet has a service() method aimed to handle requests. which is combination of data and code. In procedural program. for example. Implicit Casting: Process of simply assigning one entity to another without any transformation guidance to the compiler. In OOP program. Encapsulation: process of binding or wrapping the data and the codes that operates on the data into single entity. data is exposed to the whole program whereas in OOPs program. doDelete(). HttpServlet extends GenericServlet and addes support for doGet(). objects allow procedures to be encapsulated with their data to reduce potential interference. not in a request string. it is accessible with in the object and which in trun assures the security of the code. What is OOPs? .0) plus doPut(). Popularity: 26% [?] Share This Sample Java Interview Questions » By Admin on Oct 2. Both these classes are abstract. ServletConfig: the object created after a servlet is instantiated and its default constructor is read. Polymorphism: one name many forms. unit of program is object. ServletContext and ServletConfig: ServletContext defines a set of methods that a servlet uses to communicate with its servlet container. one way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper. dispatch requests. to get the MIME type of a file. which the web server provides the servlet when the servlet is initialized. This keeps data safe from outside interface and misuse. doTrace() methods. Native method: method that is not implemented in java. doOptions(). The ServletContext object is contained within the ServletConfig object. doHead() methods (HTTP 1. 2007 | In Sample Java Interview Questions | No Comments » Inheritance: Process by which one object acquires the properties of another object. and its impossible to guess the data transmitted to a servlet only looking at the request string.stored in a request itself. or write to a log file. Procedural programs: programming logic follows certain procedures and the instructions are executed one after the another. enables one entity to be used as general category for different types of actions.

All the requests to the server goes through the controller. In the the Jakarta Struts Framework this class plays the role of controller.Object oriented programming organizes a program around its data. Example: generates the client side java script for the form “logonForm” as defined in the validation. Anonymous class: class defined inside a mthod without name and is instantiated and declared in the same place and cannot have explicit constructors. Inner class: classes defined in other classes. interfaces are usefull for: declaring methods that one or more classes are expected to implement.properties files and these files contains the messages that can be used in the struts project. 2.xml file. Message Resources Definitions files can be added to the struts-config. ie. Controller is responsible for handling all the requests. An inner class can have nay accessibility including private. Popularity: 26% [?] . Jakarta struts interview questions » By Admin on Oct 1. Jakarta Struts is robust architecture and can be used for the development of application of any size. Struts framework makes it much easier to design scalable. reliable Web applications with Java. including those defined in methods are called inner classes. What is ActionServlet? The class org. capturing similarities between unrelated classes without forcing a class relationship.xml file through tag. How you will make available any Message Resources Definitions file to the Struts Framework Environment? Message Resources Definitions file are simple .struts. Transient modifier applies to variables only and it is not stored as part or its objects persistent state. The when added in the jsp file generates the client site validation script. Abstract class: class designed with implementation gaps for subclasses to fill in and is deliberately incomplete. objets and a set of welll defined intervaces to that data.ActionServlet is the called the ActionServlet. 3. What is Jakarta Struts Framework? Jakarta Struts is open source implementation of MVC (Model-View-Controller) pattern for the development of web based applications. Transient variables are not serialized. Interface: similar to a class which may contain method’s signature only but no body and it is a formal set of methods and contsant declarations that must be defined by the class that implements it.action. 2007 | In Jakarta struts interview questions | No Comments » 1.apache. Volatile modifier applies to variables only and it tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of the program..

e not within any methods are “member” variables (global variables). } } } 4. class a1 { a1() { int j.Share This Java Interview Questions Part 1 » By Admin on Oct 1.println(”inside”).e not within any methods and are defined as “static” are class variables . System. Variables declared within the class i. Can an Interface have an inner class? Yes. Can an Interface be final? No 3. writeExternal(ObjectOuput out) and readExternal(ObjectInput in) 6.out. What modifiers are allowed for methods in an Interface? Only public and abstract modifiers are allowed for methods in interfaces. public static void main(String a1[]) { System. }. 2007 | In Java Interview Questions Part 1 | No Comments » 1.out. Can we define private and protected modifiers for variables in interfaces? No 5. Variables declared within the class i. Can there be an abstract class with no abstract methods in it? Yes 2. And sends data into Streams in Compressed Format. 7. void dd(). public interface abc { static int i=0.println(”in interfia”). It has two methods. member and a class variable? Variables declared within a method are “local” variables. What is Externalizable? Externalizable is an Interface that extends Serializable Interface. What is a local.

On the other hand. What is synchronization and why is it important? With respect to multithreading.lang. Without synchronization. synchronization is the capability to control the access of multiple threads to shared resources. rather than a new class. it makes you write more code.System class.println() work. What are some alternatives to inheritance? Delegation is an alternative to inheritance.out. and forward messages to the instance.getHostName(). It is often safer than inheritance because it forces you to think about each message you forward. not instance variables.97.Running or runnable thread. If you change the value of a static variable in a particular object.39″). Static methods can be referenced with the name of the class rather than the name of a particular object of the class (though that works too). MS . How do I convert a numeric IP address like 192. S Suspended thread.Thread waiting on a monitor lock.18. CW . That’s how library methods like System.Thread waiting on a condition variable. and because it doesn’t force you to accept all the methods of the super class: you can provide only the methods that really make sense. because the instance is of a known class.97. Difference between JRE/JVM/JDK? 15. it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. String hostname = InetAddress. the value of that variable changes for all instances of that class. 11. Why do threads block on I/O? Threads block on i/o (that is enters the waiting state) so that other threads may execute while the I/O operation is performed. and it is harder to re-use (because it is not a subclass). What are the different identifier states of a Thread? The different identifiers of a Thread are: R . Delegation means that you include an instance of another class as an instance variable. What does it mean that a method or field is “static”? Static variables and methods are instantiated only once per class.Thread suspended waiting on a monitor lock 9. MW . Note that some of the classes like DataOutputStream have unoverloaded methods like writeInt() and writeByte(). 10. Why isn’t there operator overloading? Because C++ has proven by example that operator overloading makes code almost impossible to maintain.getByName(”192.com? 13. 14.39 into a hostname like java. 16. .sun. In fact there very nearly wasn’t even method overloading in Java.8. This often leads to significant errors. but it was thought that this was too useful for some very basic methods like print(). out is a static field in the java. In other words they are class variables.18. 12.

18. or abstract. based on priority and other factors. 21. Which characters may be used as the second character of an identifier. The scheduler then determines which task should execute next. and 18 bit patterns. 23. What are wrapped classes? Wrapped classes are classes that allow primitive types to be accessed as objects. static. UTF-16 uses 16-bit and larger bit patterns. 20. protected. private. and how are they used? Order of precedence determines the order in which operators are evaluated in expressions. 19. Is null a keyword? The null value is not a keyword. the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. 16. a task executes for a predefined slice of time and then reenters the pool of ready tasks.17. it is usually represented as 8 bits. What modifiers may be used with an inner class that is a member of an outer class? A (non-local) inner class may be declared as public. Under time slicing. What are order of precedence and associativity. How many bits are used to represent Unicode. UTF-8 represents characters using 8. 25. What restrictions are placed on the location of a package statement within a source code file? A package statement must appear as the first line in a source code file (excluding blank lines and comments). What is a native method? A native method is a method that is implemented in a language other than Java. and UTF-8 characters? Unicode requires 16 bits and ASCII require 7 bits. What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling. Associatity determines whether an expression is evaluated left-toright or right-to-left 26. 24. ASCII. final. UTF-16. Although the ASCII character set uses only 7 bits. 22. What is the catch or declare rule for method declarations? .but not as the first character of an identifier? The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.

EJB components are server-side components written entirely in the Java programming language 2. 3. It increases the performance over the network. 6. What is the range of the char type? The range of the char type is 0 to 2^16 .etc. EJB architecture is wire-protocol neutral–any protocol can be utilized like IIOP. 3. portable multi-tier. such as transactions. 28. the method must either catch the exception or declare it in its throws clause. are automatically managed for the EJB component by the EJB server. 2007 | In EJB Interview Questions | No Comments » 2. What is session Facade? Session Facade is a design pattern to access the Entity bean through local interface than accessing directly. threading. Popularity: 27% [?] Share This EJB Interview Questions » By Admin on Oct 1.If a checked exception may be thrown within the body of a method. In this case we call session bean which on turn call entity bean. What is EJB role in J2EE? EJB technology is the core of J2EE. What is the difference between EJB and Java beans? EJB is a specification for J2EE server. not a product. security.no system-level programming & services. etc. It enables developers to write reusable and portable server-side business logic for the J2EE platform. EJB components are fully portable across any EJB server and any OS. Can an anonymous class be declared as implementing an interface and extending a class? An anonymous class may implement an interface or extend a superclass. 5. persistence. What are the key features of the EJB technology? 1. Rapid application development 2. 5. Broad industry adoption . Java beans may be a graphical component in IDE. 27. EJB architecture is inherently transactional. EJB components contain business logic only . but may not be declared to do both. 4. life-cycle. distributed. What are the key benefits of the EJB technology? 1. scalable and secure.1.JRMP. DCOM. 4. HTTP.

entity beans. as they are remote references. Stateful bean maintains state between invocations.3. Stateless bean is the simplest bean. For every request from a unique client. does the container create a separate instance of the generated EJBHome and EJBObject classes? . Rather than passing the whole. 11. Create me a new EJB Object through Home Object interface. What is Entity Bean and Session Bean ? Entity Bean is a Java class which implements an Enterprise Bean interface and provides the implementation of the business methods. 9. This higher level of abstraction will be flexible enough to support it. HttpSession (which carries with it a bunch of http semantics). Session Bean is used to represent a workflow on behalf of a client. fat. 8. If anything is altered from inside the EJB. There are two types: Container Managed Persistence(CMP) and Bean-Managed Persistence(BMP). This is because you are creating an unnecessary coupling between back-end objects (EJBs) and front-end objects (HttpSession).This has to be consider as passed-by-value. A message-driven bean enables asynchronous clients to access the business logic in the EJB tier. create a class that acts as a value object (or structure) that holds all the data you need to pass back and forth between frontend/back-end. Application portability 4. session beans. 2. only if all objects in session are serializable. The EJB container implements the EJBHome and EJBObject classes. Delegate request to Bean (Enterprise Bean). it is considered to be bad practice in terms of object-oriented design. message-driven beans. that means that it?s read-only in the EJB.The pass-byreference can be used between EJBs Remote Interfaces. Create EJB Object from the Ejb Object. and 3. It doesn’t maintain any conversational state with clients between method invocations. 10. While it is possible to pass an HttpSession as a parameter to an EJB object. allowing a business component to receive JMS. Create a higher-level of abstraction for your EJBs API. it won?t be reflected back to the HttpSession of the Servlet Container. Is it possible to share an HttpSession between a JSP and EJB? What happens when I change a value in the HttpSession from inside an EJB? You can pass the HttpSession as parameter to an EJB method. Return EJB Object reference to the client. Protection of IT investment 7. Return Home Object reference to the client. Consider the case where your EJB needs to support a non HTTPbased client. What is message-driven bean? A message-driven bean combines features of a session bean and a Java Message Service (JMS) message listener. 12. There are two types: Stateless and Stateful. How many enterprise beans? There are three kinds of enterprise beans: 1. Invoke business method using EJB Object reference. How EJB Invocation happens? Retrieve Home Object reference from Naming Service via JNDI.

provide the ability to tune the container to minimize passivation calls. Use the primitive wrapper classes.The EJB container maintains an instance pool. 13. while refering the EJB Object classes the container creates a separate instance for each client request. the container will passivate the bean after every transaction (or method call for a non-transactional invocation). The way it is implemented is. which are taken care by the ejb container. With the default setting the container will attempt to keep a working set of beans in the cache. according to the specification. Similarly in the ejbStore() the container saves the object values back the the persistance storage. For example. Apart from this. There are two types of Entity Beans Container Managed and Bean Mananged. In Container Managed Entity Bean . What is EJB QL? EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence. yes most of the container providers implement the pooling functionality to increase the performance of the application server. What is the advantage of using Entity bean for database operations. you can use java. Taken from the WebLogic 6. 15. In the Bean Managed Entity Bean . retrive values.0 DTD -The passivation-strategy can be either default or transaction. 14. when you use Entity beans you dont need to worry about database transaction handling. Some EJB containers. again. Although for Stateful Session Beans. So using transactions can be a a strategy to control passivation. With the transaction setting.The developer has to specifically make connection. cannot directly control when passivation occurs. EJB QL is introduced in the EJB 2.0 specification. so the developer has control over what to do during this exercise and can implement the require optimized logic. ejbLoad and ejbStore are callback methods and can be only invoked by the container.Whenever the instance of the bean is created the container automatically retrieves the data from the DB/Persistance storage and assigns to the object variables in bean for user to manipulate or use them. database connection pooling etc. the container cannot passivate an instance that is inside a transaction. For this the developer needs to map the fields in the database to the variables in deployment descriptor files (which varies for each vendor).lang. If the container provides one. Can you control when passivation occurs? The developer. assign them to the objects in the ejbLoad() which will be called by the container when it instatiates a bean object. over directly using JDBC API to do database operations? When would I use one over the other? Entity Beans actually represents the data in a database. Can the primary key in the entity bean be a Java primitive type such as int? The primary key can?t be a primitive type. it is available otherwise it is not mandatory for the provider to implement it. The EJB QL query language defines finder methods for entity beans with container managed . instead.Integer as the primary key class. not a primitive). The ejbPassivate() method is called during passivation. but not int (it has to be a class. Having said that. such as BEA WebLogic. up to the implementer. It is not that Entity Beans replaces JDBC API. The instance pool maintenance is up to the implementation of the container. 16. The container uses these instances for the EJB Home reference irrespective of the client request.

the dynamic creation and allocation of message-driven bean instances mimics the behavior of stateless session EJB instances. What is the difference between Message Driven Beans and Stateless Session beans? In several ways. especially when changing requirements and component reuse are taken into account. but which are used by the Bean Provider to select persistent values that are maintained by the Persistence Manager or to select entity objects that are related to the entity bean on which the query is defined. in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool. . message-driven beans are different from stateless session EJBs (and other types of EJBs) in several significant ways: Message-driven beans process multiple JMS messages asynchronously. remote interfaces pass parameters using call-by-value semantics. Local interfaces also provide the foundation for container-managed relationships among entity beans with container-managed persistence. develop the application code with these choices in mind. and finally. Select methods. to allow streamlined calls to the bean if a caller is in the same container. 19. Brief description about local interfaces? EEJB was originally designed around remote invocation using the Java Remote Method Invocation (RMI) mechanism. The local interface may be defined for a bean during development. some or all of their EJB calls are between beans in a single container. that is. then decide which interfaces can be local and which remote. However. need to be factored into the design decision. which are not exposed to the client. 18.0 local interfaces are extremely useful in some situations. What happens if remove( ) is never invoked on a session bean? In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. EJB QL is used for queries of two types of finder methods: Finder methods that are defined in the home interface of an entity bean and which return entity objects. application developers need to carefully consider potential deployment scenarios up front. the EJB 2. 20. Many developers are using EJBs locally. This does not involve the overhead involved with RMI like marshalling etc.0 expert group has created a local interface mechanism. For example. This design allowed for maximum flexibility in developing applications without consideration for the deployment scenario. In case of stateful session bean. What are the special design care that must be taken when you work with local interfaces? It is important to understand that the calling semantics of local interfaces are different from those of remote interfaces. This facility will thus improve the performance of applications in which co-location is planned. and was a strong feature in support of a goal of component reuse in J2EE. While EJB 2. rather than processing a serialized sequence of method calls. and later extended to support to standard CORBA transport for these calls using RMI/IIOP.persistenceand is portable across containers and persistence managers. while local interfaces use call-byreference. 17. which exist only for the duration of a particular method call. With this feedback in mind. the bean may be kept in cache till either the session times out. This means that in order to use local interfaces safely. The number of beans in cache is managed by the container. the long-term costs of these choices.

spec. The Container maintains the entire lifecycle of a message-driven bean.In EJB this can be achieved by including the code in either the ejbCreate(). Clients interact with messagedriven beans only indirectly. 25.Message-driven beans have no home or remote interface. and so forth.Class to an EJB? Technically yes. 24. What is an EJB Context? EJBContext is an interface that is implemented by the container. Is is possible for an EJB client to marshal an object of class java. 28. Is it possible to stop the execution of a method before completion in a SessionBean? Stopping the execution of a method inside a Session Bean is not possible without writing code inside the Session Bean. In WebLogic.The enterprise bean must not attempt to query a class to obtain information about the declared members that are not otherwise accessible to the enterprise bean because of the security rules of the Java language. How can I call one EJB from inside of another EJB? EJBs can be clients of other EJBs. They also provide other functions. 26. Only the container directly interacts with a message-driven bean by creating bean instances and passing JMS messages to those instances as necessary. Static initializer blocks are also typically used to initialize static fields which may be illegal in EJB if they are read/write .lang. static initializer blocks are used to execute some piece of code before executing any constructor or method while instantiating a class. Entity beans use a subclass of EJBContext called EntityContext. See the API docs and the spec for more details.5 of EJB v1. 23. These EJBContext objects provide the bean class with information about its container. Section 11. instances cannot be created or removed as a result of client requests or other API calls. and it is also a part of the bean-container contract. 22. then acquire an instance reference.1 spec says that the deployer must specify a value for the transaction attribute for those methods having container managed transaction. It just works. and therefore cannot be directly accessed by internal or external clients. What is the difference between session and entity beans? When should I use one or the other? . Session beans use a subclass called SessionContext. This is because you are not allowed to access Threads inside an EJB. Use JNDI to locate the Home Interface of the other bean. What is the default transaction attribute for an EJB? There is no default transaction attribute for an EJB. 27. by sending a message to a JMS Queue or Topic. setSessionContext() or setEntityContext() methods. the client using the bean and the bean itself. compliant NO! . Is it legal to have static initializer blocks in EJB? Although technically it is legal. the default transaction attribute for EJB is SUPPORTS.

g. See Sun?s J2EE Connectors for more in-depth information on Connectors. processes.Caching data from a database inside the AApplication Server are what Entity EJB?s are used for. 34. How is persistence implemented in enterprise beans? . Transactions also play an important role in this scenario. 31.your Entity Bean can still be alive the EJB container. the client programmer can be assured that if they have the primary key of the Entity Bean. How can I call one EJB from inside of another EJB? EJBs can be clients of other EJBs. 32. via an external application . Is there any default cache management system with Entity beans ? In other words whether a cache of the data in database will be maintained in EJB ? . Why do we have a remove method in both EJBHome and EJBObject? With the EJBHome version of the remove. the remote version also works on session beans (stateless and stateful) to inform the container of your loss of interest in this bean. that provides (or should provide) for concurrent client connections and manages system resources such as threads.deposit. By making this method mandatory. ejbStore() is called and the row will not be found. An EJB container runs inside (or within) an EJB server.transferFunds) that call entity beans (e.An entity bean represents persistent global data from the database. database connections. Bank. If data is removed from the database. and the transaction rolled back. The EJB container insulates an EJB bean from the specifics of an underlying EJB server by providing a simple. Account. you are able to delete an entity bean without first instantiating it (you can provide a PrimaryKey object as a parameter to the remove method). A Connector provides the ability for any Enterprise Information System (EIS) to plug into any EJB server which supports the Connector architecture. memory. the session beans implement business methods (e. The home version only works for entity beans. 33. standard API between the EJB bean and its container. On the other hand. In addition. It just works.g. similar to a SELECT statement in SQL. When the transaction commits. a Container. the Remote interface version works on an entity bean that you have already instantiated.which would mean creating duplications of persistent data and break the integrity of EJB. usually a product such as BEA WebLogic. etc. and provides deployed EJB beans with transaction and security management.The ejbLoad() and ejbStore() methods are used to synchronize the Entity Bean state with the persistent storage(database). network connections. etc. then they can retrieve the bean without having to create a new bean each time . The ejbFindByPrimaryKey is a method used to locate and load an Entity Bean into the container. and so forth. and a Connector? An EJB server is an application. Account. Generally.withdraw) 29. 30. Use JNDI to locate the Home Interface of the other bean. What is the difference between a Server. then acquire an instance reference. a session bean represents transient user-specific data that will die when the user disconnects (ends his session). Why is ejbFindByPrimaryKey mandatory? An Entity Bean represents persistent data that is stored outside of the EJB Container/Server.

ejbStore(). 35. Message driven . which contain business logic and maintain a state associated with client sessions. These EJBContext objects provide the bean class with information about its container. the client using the bean and the bean itself. What happens to an instance field not mapped to any persistent storage. Stateful Session and Entity beans is completely different. The original bean types include session beans. which map objects to persistent data. 38. and it is also a part of the bean-container contract. then the container is responsible for calling the ejbCreate() method in the bean. and entity beans. 39. What is an EJB Context? EJBContext is an interface that is implemented by the container. 37. For BMP. which should have functionality inside for going to the database and looking up the data. anytime you modify a field in a CMP bean. to call the appropriate method on the bean. The container is responsible. the new data is persisted to the database by the container. So. Session beans use a subclass called SessionContext. depending on how you implement your beans: container managed persistence (CMP) or bean managed persistence (BMP) For CMP.No.Persistence in EJB is taken care of in two ways. when the bean is passivated? The specification infers that the container never serializes an instance of an Entity bean (unlike stateful session beans). 36. Remember that when an entity bean is passivated the instance gets logically disassociated from its remote object. ejbRemove() methods would be developed by the bean developer to make calls to the database. when the create () method is called on the Home interface. the ejbCreate(). the EJB container which your beans run under takes care of the persistence of the fields you have declared to be persisted with the database this declaration is in the deployment descriptor. what functions does a message driven bean have and how do they work in collaboration with JMS? Message driven beans are the latest addition to the family of component bean types defined by the EJB specification. Thus passivation simply involves moving the bean from the ready to the pooled bin. for instance. You cannot change the transaction isolation level in the middle of transaction. the EJB bean developer is responsible for defining the persistence routines in the proper places in the bean. Entity beans use a subclass of EJBContext called EntityContext. So what happens to the contents of an instance variable is controlled by the programmer. The EJB specification specifically states that the enterprise bean is not allowed to use thread primitives. For Entity Beans. They also provide other functions. So. Are we allowed to change the transaction isolation property in middle of a transaction? No. as the functionality of passivation/activation for Stateless Session. Be careful here. See the API docs and the spec for more details. For entity beans the ejbPassivate method notifies the entity bean that it is being disassociated with a particular entity prior to reuse or for dereference. What is a Message Driven Bean. in BMP. if the bean is being looked up. Is method overloading allowed in EJB? Yes you can overload methods should synchronization primitives be used on bean methods? . as soon as the method you have executed is finished. The container is responsible for managing concurrent access to beans at runtime.

to save additional memory. Therefore.2 supports the dynamic class loading. because even .MessageListener interface. The container uses these instances for the EJB Home reference irrespective of the client request. but they can be used only for serving Home methods (create or findBy). If the container provides one. yes most of the container providers implement the pooling functionality to increase the performance of the application server. The EJB container implements the EJBHome and EJBObject classes. Instead. 42. message beans do not have home or remote interfaces. 41. Like stateless session beans. Unlike entity beans and session beans. This mean that the instances do represent entity beans. Note that session beans and entity beans are not allowed to function as message beans. in fact. while referring the EJB Object classes the container creates a separate instance for each client request. which defines a single onMessage () method. When a message arrives. Having said that. the container ensures that a message bean corresponding to the message topic/queue exists (instantiating it if necessary).beans will provide asynchrony to EJB based applications by acting as JMS message consumers. but has not been yet synchronized or assigned to an EJBObject. Then. 40. and calls its onMessage method passing the client?s message as the single argument. Does RMI-IIOP support code downloading for Java objects sent by value across an IIOP connection in the same way as RMI does across a JRMP connection? Yes. message beans maintain no client-specific state. since those methods do not relay on the specific values of the bean. A message bean is associated with a JMS topic or queue and receives JMS messages sent by EJB clients or other beans. after some time. The instance pool maintenance is up to the implementation of the container. the container will. the container may begin moving entity beans from the Pooled State to the Does Not Exist State. All these instances are. message driven beans implement the javax.jms. The message bean?s implementation of this method contains the business logic required to process the message. This similarity is a fundamental design goal of the JMS capabilities of the new specification. To receive JMS messages. Clients send JMS messages to message beans in exactly the same manner as they would send messages to any other JMS destination. For every request from a unique client. message driven beans are instantiated by the container as required. exactly the same. Does the container create a separate instance of the generated EJBHome and EJBObject classes? The EJB container maintains an instance pool. so. they do not have meaningful state. The way it is implemented is again up to the implementer. it is available otherwise it is not mandatory for the provider to implement it. What is the advantage of putting an Entity Bean instance from the Ready State to Pooled state The idea of the Pooled State is to allow a container to maintain a pool of entity beans that has been created. in such cases. move the entity bean from the Ready State to the Pooled state to save memory. allowing the container to optimally manage a pool of message-bean instances. Jon Thorarinsson has also added: It can be looked at it this way: If no client is using an entity bean of a particular type there is no need for caching it (the data is persisted in the database). The JDK 1.

the bean still takes up some memory just being in the Pooled State.sendRedirect(”http://www.com”). Service Activator etc etc. Service To Worker.e your request will be redirected to another resoure on different application/server response. res).though the bean?s cache has been cleared.usually design pattern is an abstraction of a solution at a very high level.There are types of design patterns. Session Facade. Design Patterns? In simple words. 2007 | In Latest Java interview questions | No Comments » 1. i cant remember all those things. Application servers jumped into the limelight only about two years ago and there is a proliferation of . Service Locator. while Microsoft Internet Information Server (IIS) and iPlanet Web Server are among the others. If you want to forward your request to another page on the same application then you’ll be using the requestdispatcher.There are few Web servers in common use: Apache takes the lion’s share. we want to go forward from one page then come backward then what is the difference between send redirect and forward ? Ans: If you want to redirect your page which is residing on a different application then you’ll be using response.sendRedirect().like creational . 2007 | In Home | No Comments » These are two quite different pieces of software.getRequestDispatcher(”/servlet/AccountServlet”). When we declare a Private Constructor? Ans. rd. here the request will be forwarded to another application i. refer to the OODesign book by Grady Booch and James Rumbough i think 4. How we can compare the equility of two objects not variables? Ans: using the equals() Method we can compare the two objects Web Servers vs.all the design patterns are classified into these three specified patterns we have so many patterns like intercepting filter.behavorial and structural design patterns. What is the difference between redirect and forward in the sense. Latest Java interview questions » By Admin on Sep 17. SingleTon. If we dont want the constructor to be visible to the extend classes then we can declare a constructor to be private and also if we want a class to made as a singleton class then we have to declare it has private 2. 3. Front Controller. Value Object.forward(req. DAOs .somesite. RequestDispatcher rd = ct. View Helper. App Servers » By Admin on May 19.What happens when any request comes from a client (Whole scenario)? –For this question I’ll answer when i have time— 5.

gathering data from databases. sends Web pages to browsers as its primary function. Why there are some interfaces with no defined methods (i. and perform other tasks. Oracle. applying business rules. 2. in general.g. right? Well. The majority of a Web server’s work is to execute HTML or scripting such as Perl. or VBScript. hardly ever. Used in the factory method pattern (Refer Q46 in Java section). In some respects the term application server is misleading since the functionality isn’t limited to applications. The Web server. format data. } .products from companies such as BEA. Most Web servers also process input from users. They just tell the compiler that the objects of the classes implementing the interfaces with no defined methods need to be treated differently. StringUtils etc. or storing the state of a user’s session. regardless of the value of the boolean choice: try { if (choice) { while (true) . HP (Bluestone). processing security clearances. In general. an application server prepares material for the Web server — for example. Speaking of functionality. iPlanet. provide security. } } finally {code. Popularity: 2% [?] Share This Where and how can you use a private constructor? » By Admin on May 19.exit(1). Cloneable etc The code in a finally clause will never fail to execute. 1. Used in utility classes e. marker interfaces) in Java? The interfaces with no defined methods act like markers.e. 2007 | In Home | No Comments » Private constructor is used if you do not want other classes to instantiate the object. Example Serializable. (Refer Q45 in Java section). SilverStream. in differentiating the two servers we have to say “in general” because there are customized versions of both Web and application servers that have crossover functionality.to. Used in the singleton pattern. But here’s an example where the finally code will not execute. JavaScript. Its role is more as an aggregator and manager for data and processes used by anything running on a Web server. The instantiation is done by a public static method within the same class. } else { System.cleanup(). and IBM. 3.

util. public class ThreadTest { private Vector threadNames = new Vector(). How can I implement a thread-safe JSP page? What are the advantages and Disadvantages of using it? . Within error. as mentioned above. For example. created by the web container and contain information related to a particular request. all requests to that page will access those variables.jsp. including the example above of not being able to use < %! %>. exception. config. pageContext. JSP technology is extensible through the development of custom actions. out. public static void main(String[] args) { Popularity: 2% [?] 1. you will have N instances of the servlet loaded and initialized. I will need to tell the main thread to wait. 4. page.You can make your JSPs thread-safe by having them implement the SingleThreadModel interface. More importantly.You can use the errorPage attribute of the page directive to have uncaught run-time exceptions automatically forwarded to an error processing page.jsp" %> redirects the browser to the JSP page error. What are the implicit objects? .Vector. or tags. SingleThreadModel is not recommended for normal use. or application. There are many pitfalls. With this.Popularity: 2% [?] Share This When to join threads » By Admin on May 18. application. 2007 | In Home | No Comments » Let’s say I need to spawn multiple threads to do the work. They are: request. This is done by adding the directive <%@ page isThreadSafe="false" %> within your JSP page.join() method. response. package foo. Is JSP technology extensible? .Implicit objects are objects that are 2. The key point is to use Thread. instead of a single instance of the servlet generated for your JSP page loaded in memory. 3. . 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. If you do use this tag. page. You should try really hard to make them thread-safe the old fashioned way: by making them thread-safe How does JSP handle run-time exceptions? . session. For example: <%@ page errorPage="error. Otherwise. import java. via the directive: <%@ page isErrorPage="true" %> Throwable object describing the exception may be accessed within the error page via the exception implicit object.jsp if an uncaught exception is encountered during request processing. Note: You must always use a relative URL as the value for the errorPage attribute. which are encapsulated in tag libraries.Yes. causing a nasty race condition. and continue to the next step only after all of them complete. if you indicate that it is an error-processing page. then you should set isThreadSafe to true. avoid using the tag for variables. with the service method of each instance effectively synchronized.

but if it ’s already begin to set up the header. 0).) Before you indicate that the file is over (and before the size of . What does it mean? This error show only when you try to redirect a page after you already have written something in your page.You can use “JSP-style” comments to selectively block out code while debugging or simply to comment your scriptlets. out. How do I use comments within a JSP page? ."no-store"). For example: <!-.println("Hello World"). <% 9.5. <% response. For example. JSP comments are not visible at the client.) When you try to send a redirect status (Number is line_status_402).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. %> 11.setHeader("Cache-Control".(c) 2004 --> Of course. your HTTP server cannot send it right now if it hasn’t finished to set up the header."no-cache"). etc. //HTTP 1.setHeader("Pragma". you can also use comments supported by your JSP scripting language within your scriptlets.the scriptlet is now commented out 8.1 response. assuming Java is the scripting language.0 response. If not starter to set up the header. //prevents caching at the proxy server %> 6. contenttype=”text/html” or “text/xml” or “plain-text” or “image/jpg”. <%-.setDateHeader ("Expires". 10. you can have: <% //some comment /** yet another comment **/ %> 12. //HTTP 1. You need both the statements to take care of some of the older browser versions. there are no problems. Response has already been commited error. This happens because HTTP specification force the header to be set up before the lay out of the page can be shown (to make sure of how it should be displayed. For example: 7. These comments are visible at the client. Just execute the following scriptlet at the beginning of your JSP pages to prevent them from being cached at the browser. How do I prevent the output of my JSP or Servlet pages from being cached by the browser? . --%> You can also use HTML-style comments anywhere within your JSP page. then your HTTP server expects these headers to be finished setting up and it cannot be the case if the stream of the page is not over… In this last case it’s like you have a file started with <HTML Tag><Some Headers><Body>some output (like testing your variables.

response.Foo" > 15. If the browser does not support cookies.jsp by clicking on the link present within the page. However. Consider the following example.DateFormat. Try this example first with cookies enabled. If the body is specified. 24. interact with each other.Bar.the page can be setted up in the header). Typically. <jsp:useBean id="foo" class="com. the body will contain scriptlets or jsp:setProperty tags to initialize the newly instantiated bean. .getValue("num"). say hello1. hello1. in which two JSP files. <%-. allowing hello2. the input URL is returned unchanged since the session ID will be persisted as a cookie. URL rewriting essentially includes the session ID within the link itself as a name/value pair.A jsp:useBean action may optionally have a body. Both encodeURL() and encodeRedirectedURL() first determine whether cookies are supported by the browser.We know that session tracking uses cookies by default to associate a session identifier with a unique user.encodeRedirectURL() can be used by giving the redirected URL as input. <% 23. 26.text. 25. you need to append the session ID for each and every link that is part of your servlet response. 14.Within hello2. <%@ page session="true" %> 30. we create a new session within hello1. and if you are using redirection. Do note that to get this example to work with cookies disabled at the browser.jsp"). Notice that we invoke the encodeURL() within hello1.1 13. Basically. or if cookies are disabled. value="<%=java. Integer num = new Integer(100).jsp and place an object within this session. we simply extract the object that was earlier placed in the session and display its contents.jsp. you can still enable session tracking using URL rewriting. Then disable cookie support.num).jsp 29. its contents will be automatically invoked when the specified bean is instantiated. <% 31.Date()) %>"/ > 17.jsp and hello2. <%@ page session="true" %> 22. although you are not restricted to using those alone.format(new java. String url =response.jsp to still retrieve the session object.getDateInstance(). your JSP engine has to support URL rewriting. if so.putValue("num". Integer i= (Integer )session. if cookies are disabled. The following example shows the “today” property of the Foo bean initialized to the current date when it is instantiated. %> 27. How can I enable session tracking for JSP pages if the browser has disabled cookies? .jsp. How do I use a scriptlet to initialize a newly instantiated bean? . we make use of a JSP expression within the jsp:setProperty action.jsp</a> 28.jsp. Each time you should see the maintenance of the session across pages. Adding the session ID to a link is greatly simplified by means of of a couple of methods: response.scriptlets calling bean setter methods go here --%> 18. Note that here.jsp 21.encodeURL() associates a session ID with a given URL. <a href='<%=url%>'>hello2. The user can then traverse to hello2. you try to send a redirect status.0 and 1. restart the brower. </jsp:useBean > 19.encodeURL("hello2. <jsp:setProperty name="foo" property="today" 16. the session ID is automatically appended to the URL. 20. hello2.util.jsp on the link used to invoke hello2. session. It s simply impossible due to the specification of HTTP 1. and try again. for this to be effective.

a default inactivity lease period for all sessions is set within your JSP engine admin screen or associated properties file. out.setMaxInactiveInterval() method. %> 44.Typically. </body> 59. mycookie. 43. } 52. you can manage the inactivity lease period on a per-session basis. . response. %> would reset the inactivity period for this session to 5 minutes..You can declare methods for use within your JSP page as declarations.A cookie. public String whereFrom(HttpServletRequest req) { 36. return req."aValue"). I see that you are coming in from "). 51. or within JSP scriptlets and expressions. This is done by invoking the HttpSession. can be deleted using the following scriptlet: <% //creating a cookie Cookie mycookie = new Cookie("aName". session and so forth from within JSP methods. <%@page contentType="text/html"%> 48. However.% > 58. response.getRemoteHost(). . 67. 33.getSession(). writer. 38. %> 41. 37. file1. 39. if your JSP engine supports the Servlet 2. <% 62. <% 42.println("Num value in session is "+i. How can I set a cookie and delete a cookie from within a JSP page? 65. right after the session has been created. For example: 61.jsp 54. public void test(JspWriter writer) throws IOException{ 50. %> 53. Do note that you do not have direct access to any of the JSP implicit objects like request.. Is there a way I can set the inactivity lease period on a per-session basis? . } 40.setMaxInactiveInterval(300). you should be able to pass any of the implicit JSP variables as parameters to the methods you declare. <%= whereFrom(request) %> 45. 64.intValue()). //delete a cookie . <%! 49. session. <body> 57. <%test(out).32. </html> 60.println("Hello!"). The methods can then be invoked within any other methods you declare. 63.1 API. HttpSession ses = req. <html> 56. The inactivity interval is set in seconds. 68. file2. However.addCookie(mycookie). 69. For example: 34.jsp: 47. <%! 35. 66. <%@include file="file1.print("Hi there. How can I declare methods within my JSP page? .jsp"%> 55. Another Example 46. out.

The following code snippet shows how a servlet instantiates a bean and initializes it with FORM data posted by a browser. f. How does a servlet communicate with a JSP page? . } catch (Exception ex) { 92.addCookie(killMyCookie). try { 78.FormBean(). after first extracting it from the default request scope via the useBean action.setAge(request.setMaxAge(0). //maybe perform a db query. String id = request. The bean is then placed into the request.One should be very careful when having JSP pages extend custom servlet classes as opposed to the default one generated by the JSP engine. } 94. and the call is then forwarded to the JSP page.setAttribute("fBean". //use the id to compute 84. ("/jsp/Bean1. 73. by means of a request dispatcher for downstream processing. public void doPost (HttpServletRequest request. you may lose out on any advanced optimization that may be provided by the JSP engine. In any case. instead of the default? . How do I have the JSP-generated servlet subclass my own custom servlet class. 87.FormBean f = new govi.getParameter("addr")). 71. 83. . your new superclass has to fulfill the contract with the JSP engine by: Implementing the HttpJspPage interface. //additional bean properties like info 85. response). null). request.setName(request.70.forward(request.setPersonalizationInfo(info). 81. %> 75. getServletConfig(). govi. HttpServletResponse response) { 77. 79.getServletContext(). etc.setAddr(request. .jsp"). .getParameter("age")). } The JSP page Bean1. 72. In doing so. f.jsp can then process fBean. // . 74. Cookie killMyCookie = new Cookie("mycookie".getParameter("name")). killMyCookie. 89. or implementing JspPage otherwise Ensuring that all the methods in the Servlet interface are declared final Additionally.FormBean" scope="request" / jsp:getProperty name="fBean" property="name" / jsp:getProperty name="fBean" property="addr" / jsp:getProperty name="fBean" property="age" / jsp:getProperty name="fBean" property="personalizationInfo" / 95. your servlet superclass also needs to do the following: o The service() method has to invoke the _jspService() method o The init() method has to invoke the jspInit() method o The destroy() method has to invoke jspDestroy() . killMyCookie. f.getRequestDispatcher 90.getParameter("id"). 86. . 93.jsp. 82. if the protocol used is HTTP.f). 80. 88. 76. . Bean1.setPath("/"). jsp:useBean id="fBean" class="govi. 91. f. response.

} 101. ServletConfig cfg=getServletConfig(). exception. like 103. 118. You will have to use a PrintWriter object instead. out. <input type="text" name="shoesize" value="< %=blanknull(shoesize)% >" > 104. you cannot print the stacktrace using the JSP out implicit variable. Once the superclass has been developed. String value = cfg.getWriter(). String name=(String)e.hasMoreElements(). return (s == null) ? "" : s. %> 112.println(" ").util. System. By looking at a stack trace. a programmer should be able to discern which method threw the exception and which method called that method.getInitParameter(name).*" %> 114. 113.printStackTrace(pw).nextElement(). <% 107. <%! 98. out.ServletName" %> 96.println(" "). ServletConfig cfg =null.out. String blanknull(String s) { 99. 100. the JSP engine may throw a translation error. 120.The JspPage interface defines the jspInit() and jspDestroy() method which the page writer can use in their pages and are invoked in much the same manner as the init() and destory() methods of a servlet.println(name+"="+value). 121. How can my JSP page communicate with an EJB Session Bean? . <%! 115.) { 119. How do you pass an InitParameter to a JSP? . 116. for (Enumeration e=cfg.You could make a simple wrapper function. How can I prevent the word "null" from appearing in my HTML input text fields when I populate them with a resultset that has null values? . %> 125. } 123. How can I get to print the stacktrace for an exception occuring within my JSP page? . %> 102. <%@ page isErrorPage="true" %> 106. 110. 108. <%@ page import="java.getInitParameterNames(). PrintWriter pw = response. public void jspInit(){ 117. which is of type JspWriter. The following snippet demonstrates how you can print a stacktrace from within a JSP error page: 105. 111. you can usually diagonse a problem better when debugging JSP pages. However.The following is a code snippet that demonstrates how a JSP page can interact with an EJB session bean: . e.If any of the above conditions are not satisfied. then use it inside your JSP form. } 124. you can have your JSP extend it as follows: <%@ page extends="packageName. 109. The example page below enumerates through all the parameters and prints them to the console. like 97.By printing out the exception’s stack trace. 122.

narrow(ref.. %> 137. <%@ page import="javax. //instantiate the session bean 139.AccountHome..... Object ref= cntxt.Account" %> 127. } 136. >: In this case the content of the included file is textually embedded in the page that have <%@ include file=". It is executed ( the included page is executed and the generated html content is included in the content of calling jsp) each time the client page is accessed by the client.class). // etc etc.. >: This is like a function call from one jsp to another jsp. 142.. accHome = (AccountHome)PortableRemoteObject.doWhatever(.AccountHome. //declare a "global" reference to an instance of the home interface of the session bean 129.. 140.*. <%@ include file = .rmi... The differences are as follows: <jsp:include page = . AccountHome accHome=null.PortableRemoteObject. the changed content will not included in the output. %> Categories: Networking. 133."> directive. 130. In this case in the included file changes.126. foo. 143.naming. //obtain an instance of the home interface 132. Account acct = accHome. //invoke the remote methods 141. 134.create(). >?. <%! 128.). This approach is useful to for modularizing the web application. foo. 135.lookup("java:comp/env/ejb/AccountEJB"). If the included file changed then the new content will be included in the output. Answer: Both the tag includes the information from one page in another.... InitialContext cntxt = new InitialContext( ). javax. > and <%@ include file = . Java There are six JSP Actions: <jsp:include/> <jsp:forward/> <jsp:plugin/> <jsp:usebean/> <jsp:setProperty/> <jsp:getProperty/> Question: What is the difference between <jsp:include page = . <% 138. acct. public void jspInit() { 131. This approach is used when the code from one jsp file required to include .

page.A page with the text Welcome is displayed Question: What are implicit Objects available to the JSP Page? Answer: Implicit objects are the objects available to the JSP page.servlet. b) A page with the text Welcome is displayed c) An exception will be thrown because the implicit out object is not used d) An exception will be thrown because PrintWriter can be used in servlets only Answer :. .println("Welcome"). Answer: The <jsp:forward> element forwards the request object containing the client request information from one JSP file to another file. The target file can be an HTML file.sendRedirect(url). a) A blank page will be displayed. > and response.sendRedirect kills the session variables.. sendRedirect sends HTTP temporary redirect response to the browser. a) Embedding of Java code in HTML pages b) Platform independence c) Creation of database-driven Web applications d) Server-side programming capabilities Answer :.ServletContext Description The context for the JSP page's servlet and any Web components contained in the same application.?. Question: What is the difference between <jsp:forward page = . as long as it is in the same application context as the forwarding JSP file. %> </BODY> </HTML> Suppose you access this JSP file. and browser creates a new request to go the redirected page..getWriter().in multiple jsp files. print. or a servlet. The response. another JSP file. Find out your answer. The JSP implicit objects are: Variable application Class javax. or application.Embedding of Java code in HTML pages Write the following code for a JSP page: <%@ page language = "java" %> <HTML> <HEAD><TITLE>RESULT PAGE</TITLE></HEAD> <BODY> <% PrintWriter print = request. Question: Identify the advantages of JSP over Servlet. These objects are created by Web container and contain information related to a particular request.

jsp. session javax.servlet. Provides a single API to pageContext javax. A hidden comments does not appear in the generated output in the html.JspWriter Question: What are all the different scope values for the <jsp:useBean> tag? Answer:<jsp:useBean> tag is used to use any java object in the jsp page.servlet.toLocaleString() %> --> Question: What is expression in JSP? Answer: Expression tag is used to insert Java values directly into the output. converted to a String. Here are the scope values for <jsp:useBean> tag: a) page b) request c) session and d) application Question: What is JSP Output Comments? Answer: JSP Output Comments are the comments that can be viewed in the HTML source file. Not response javax.ServletRequest Subtype of The response to be returned to the client. The context for the JSP page. The following expression tag displays time on the output: <%=new java. Not typically used by JSP page authors.This is hidden comment --%> Example of output comment: .lang.ServletResponse typically used by JSP page authors.lang.This page was loaded on <%= (new java.servlet.Date()%> Question: What types of comments are available in the JSP? Answer: There are two types of comments are allowed in the JSP. javax.jsp.http. The output stream. These are hidden and output comments.PageContext manage the various scoped attributes.servlet. Subtype of request The request triggering the execution of the JSP page.ServletConfig java. Example of hidden comment: <%-. Accessible only from an error page.config exception out Initialization information for the JSP page's servlet. javax. Syntax for the Expression tag is: <%= expression %> An expression tag contains a scripting language expression that is evaluated.Date()).servlet.util. Example: <!-. The instance of the JSP page's servlet processing the page java. and inserted where the expression appears in the JSP file.util.HttpSession The session object for the client.Throwable javax. while output comments appear in the generated output.servlet.Object current request.This file displays the user login screen --> and <!-.

<!-- This is output comment -->

Question: What is JSP declaration? Answer: JSP Decleratives are the JSP tag used to declare variables. Declaratives are enclosed in the <%! %> tag and ends in semi-colon. You declare variables and functions in the declaration tag and can use anywhere in the JSP. Here is the example of declaratives: <%@page contentType="text/html" %> <html> <body> <%! int cnt=0; private int getCount(){ //increment cnt and return the value cnt++; return cnt; } %> <p>Values of Cnt are:</p> <p><%=getCount()%></p> </body> </html>

Question: What is JSP Scriptlet? Answer: JSP Scriptlet is jsp tag which is used to enclose java code in the JSP pages. Scriptlets begins with <% tag and ends with %> tag. Java code written inside scriptlet executes every time the JSP is invoked. Example: <% //java codes String userName=null; userName=request.getParameter("userName"); %>

Question: What are the life-cycle methods of JSP? Answer: Life-cycle methods of the JSP are: a) jspInit(): The container calls the jspInit() to initialize the servlet instance. It is called before any other method, and is called only once for a servlet instance. b)_jspService(): The container calls the _jspservice() for each request and it passes the request and the response objects. _jspService() method cann't be overridden. c) jspDestroy(): The container calls this when its instance is about to destroyed. The jspInit() and jspDestroy() methods can be overridden within a JSP page.

Question: What do you understand by context initialization parameters? Answer: The context-param element contains the declaration of a web application's servlet context initialization parameters. <context-param> <param-name>name</param-name> <param-value>value</param-value> </context-param> The Context Parameters page lets you manage parameters that are accessed through the ServletContext.getInitParameterNames and ServletContext.getInitParameter methods. Question: Can you extend JSP technology? Answer: JSP technology lets the programmer to extend the jsp to make the programming more easier. JSP can be extended and custom actions and tag libraries can be developed. Question: What do you understand by JSP translation? Answer: JSP translators generate standard Java code for a JSP page implementation class. This class is essentially a servlet class wrapped with features for JSP functionality. Question: What you can stop the browser to cash your page? Answer: Instead of deleting a cache, you can force the browser not to catch the page. <% response.setHeader("pragma","no-cache");//HTTP 1.1 response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", -1); response.setDateHeader("max-age", 0); //response.setIntHeader ("Expires", -1); //prevents caching at the proxy server response.addHeader("cache-Control", "private"); %> put the above code in your page. Question: What you will handle the runtime exception in your jsp page? Answer: The errorPage attribute of the page directive can be used to catch runtime exceptions automatically and then forwarded to an error processing page. For example: <%@ page errorPage="customerror.jsp" %> above code forwards the request to "customerror.jsp" page if an uncaught exception is encountered during request processing. Within "customerror.jsp", you must indicate that it is an error-processing page, via the directive: <%@ page isErrorPage="true" %>. 21) How do you share session objects between servlets and JSP?

Sharing sessions between a servlet and a JSP page is straight forward. JSP makes it a little easy by creating a session object and making it availabe already. In a servlet you would have to do it yourself. This is how:

//create a session if one is not created already now HttpSession session = request.getSession(true); //assign the session variable to a value. session.putValue("variable","value"); in the jsp page this is how you get the session value: <% session.getValue("varible"); %> 22) What is a servlet?

A servlet is a way of extending your web server with a Java program to perform tasks previously dealt with by CGI scripts or proprietary server extension frameworks.

23) Is there any method to unload a servlet from Web Server memory without restarting the server?

There is no standard method/mechanism to unload a servlet from memory. Some servers, like JWS, provide the means to load and unload servlets from their administration module. Others, like Tomcat, require you to just replace the WAR file. 24) What distinguishes a JavaBean from a Servlet?

JavaBeans are a set of rules to follow to create reusable software components, or beans. This contains properties and events. At the end you have a component which could be examined by a program (like an IDE) to allow the user of your JavaBean component to configure it and to run in its Java programs. Servlets are Java classes running in a Servlet engine implementing a particular interface: Servlet, forcing you to implement some methods (service()). The servlet is an extension of your web server where this servlet is running on and only lets you know when a user requests a GET or POST calls from a web page to your servlet. So, both have nothing in common except Java. 25) How much data we can store in a session object?

Any amount of data can be stored there because the session is kept on the server side. The only limitation is sessionId length, which shouldn't exceed ~4000 bytes - this limitation is implied by HTTP header length limitation to 4Kb since sessionId may be stored in the cookie or encoded in URL (using "URL rewriting") and the cookie

then the various createStatement methods will give you a thread-safe. 28) Can I use System.exit() in servlets? Gack! No no no no no. You probably shouldn't override service().. 26) What is the difference between the doGet and doPost methods? doGet is called in response to an HTTP GET request. doPost is called in response to an HTTP POST request.sendRedirect(). It has slightly different syntax requirements too gory to get into here. At best. huh? :-) 29) I am opening a single JDBC connection in my init() method. Both rewrite a raw URL to include session data if necessary. This happens with some HTML FORMs (those with METHOD="POST" specified in the FORM tag). Do I need to synchronize on the Connection or the Statement object? You shouldn't have to. or enter a URL into the browser's address bar. you'll get a security exception.html\n) cannot be longer then 4kb. even if other requests/threads are also accessing other Statements on the same Connection. or maybe the entire web server. you'll make the servlet engine. quit. If your JDBC driver supports multiple connections. It also happens with some HTML FORMs (those with METHOD="GET" specified in the FORM tag). You should override one or both to perform your servlet's actions. . both are no-ops. GET /document. (If cookies are on.specification says the size of cookie as well as HTTP request (e.) encodeURL is for normal links inside your HTML pages. encodeRedirectURL is for a link you're passing to response.g. Both methods are called by the default (superclass) implementation of service in the HttpServlet base class.. You don't really want to do that. At worst. 27) What is the difference between encodeRedirectUrl and encodeURL? encodeURL and encodeRedirectURL are methods of the HttpResponse object. reentrant. This happens when users click on a link. independent Statement that should work OK.

getServerInfo() method as follows: String thisServer= getServletConfig(). See this FAQ for more information. } 3) How do I ensure that my servlet is thread-safe? ] This is actually a very complex issue. res).getServerInfo() %> ) Is it the "servlets" directory or the "servlet" directory? For Java Web Server:  on the file system.. If you are using JSP.com/servlet/DateServlet  2) How do I support both GET and POST protocol from the same Servlet? The easy way is. it's "servlet" http://www.stinky. crossing your fingers never hurts. since it is only called by a single thread. The init() method is guaranteed to be called once per servlet instance. but there are never any guarantees. You don't have to worry about thread safety inside this method. The modern versions of JDBC drivers should work OK. Using connection pooling will avoid the whole issue. you can invoke the ServletContext. Many early JDBC drivers were not re-entrant.. A few guidelines: 1. you can use this expression: <%= application.1\servlets\DateServlet. plus will lead to improved performance. HttpServletResponse res) throws ServletException. IOException { doPost(req. just support POST.class in a URL path. then have your doGet method call your doPost method: public void doGet(HttpServletRequest req. 30) How can I determine the name and version number of the servlet or JSP engine that I am using? From within a servlet.getServletContext().getServerInfo(). it's "servlets" c:\JavaWebServer1.Of course. and the web server will wait until that thread exits before sending any more threads into your service() method. when the servlet is loaded. .

If the target servlet is flagged with this interface. From the JavaDoc: &amp.. and dispatching each service call to a free servlet. or use Session Tracking.2. Every new client request generates (or allocates) a new thread. no matter how many client requests are in process. doGet() et al. However.quot. Note that you need not (and should not) synchronize on local data or parameters. That means that at any given moment. And especially you shouldn't synchronize the service() method! (Or doPost(). 4. doGet() and so forth). 7. plus it's more difficult to share data across instances than within a single instance. new init parameters.) 3.g.quot. Note that this is not an ideal solution. e. that thread calls the service() method of your servlet (which may in turn call doPost(). This empty interface tells the web server to only send one client request at a time into your servlet. This means that you should be careful to synchronize access to shared data (instance variables) using the synchronized keyword.. the servlet will be thread safe. 6. you can declare that your servlet &amp.. there may be many threads running inside the service() method of your solo instance. Under most circumstances.. all sharing the same instance data and potentially stepping on each other's toes. In essence.quot.&amp. To share data across successive or concurrent requests.) A simple solution to synchronizing is to always synchronize on the servlet instance itself using &amp. See also What's a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization? 5. (Note that the server will also allocate a new instance if you register the servlet with a new name and.. the servlet programmer is guaranteed that no two threads will execute concurrently the service method of that servlet.quot. there is only one instance of your servlet.quot. This guarantee is ensured by maintaining a pool of servlet instances for each such servlet. this can lead to performance bottlenecks. If you absolutely can't deal with synchronizing. you can use either instance variables or class-static variables. if the servlet implements this interface.synchronized (this) { . .implements SingleThreadModel&amp.quot. since performance may suffer (depending on the size of the instance pool). }&amp. you're usually better off synchronizing on the data objects themselves.

5) How do I upload a file to my servlet or JSP? On the client side.decode() (the latter was (finally!) added to JDK 1. I forget offhand) (Unfortunately. Most modern browsers do. but there's no guarantee.$sessionid$=DSJFSDKFSLDFEEKOE"> (or whatever the actual syntax is. it is enabled by the mod_rewrite module. Example: changing <A HREF="nextpage. sometimes uses URL Rewriting when cookies are unavailable. or to map old file names to new file names. which is part of the Servlet API. Sigh. or after a certain number of seconds have passed. only the information gets stored inside the URL. whichever comes first.apache. 9. destroy() can not throw an exception. and entity encoding? URL Encoding is a process of transforming user input to a CGI form so it is fit for travel across the network -. Sun's Servlet Tutorial has an example of how to do this with reference counting.) There's also a feature of the Apache web server called URL Rewriting. the client's browser must support form-based upload. To perform these operations.quot. stripping spaces and punctuation and replacing with escape characters. call java. the method in the Servlet API for doing URL rewriting for session management is called encodeURL().2. allowing you to do things like automatically add a trailing slash to a directory name.html"> into <A HREF="nextpage.net.. 4) What is the difference between URL encoding.URLDecoder. so if something bad happens. It's sort of like cookies. It rewrites URLs on their way in to the server. The HttpSession API.org/docs/misc/FAQ.html. and/or wait for the other requests to quit. HTML escaping. URL Decoding is the reverse process. see the Apache FAQ (http://www. This means that other threads might be running service requests at the same time as your destroy() method is called! So be sure to synchronize.quot.closing a JDBC connection&amp. as an additional parameter.8.encode() and java.basically. The server calls destroy either after all service calls have been completed. URL rewriting. The destroy() method is not necessarily as clean as the init() method. For example. Example: changing "We're #1!" into "We%27re+%231%21" URL Rewriting is a technique for saving state information on the user's browser between page hits. For more information. <FORM ENCTYPE='multipart/form-data' method='POST' action='/myservlet'> <INPUT TYPE='file' NAME='mptest'> . call log() with a helpful message (like the exception). See the &amp.URLEncoder. aka Java 2).html#rewrite-more-config) . example in Sun's Tutorial.. This has nothing to do with servlets.net.

servletcentral. Fortunately. brings up a button for a file select box on the browser together with a text field that takes the file name once selected.hp.com/people/ak/java/#utils.upload) "makes it easy to add robust. You can learn all about this format in RFC 1867.hp.hpl. Some of these assume that you will be writing the file to disk. UploadBean by JavaZoom claims to handle most of the hassle of uploading for you. There's an Upload Tag in dotJ          .file&amp. file upload capability to your servlets and web applications" CParseRFC1867 (available from http://www. JavaMail also has MIME-parsing routines (see the Purple Servlet References). there is no method in the Servlet API to do this.tomcat. your servlet must process the POST data in order to extract the encoded file. ak@hplb. JSPSmart has a free set of JSP for doing file upload and download. including writing to disk or memory.hpl. When it reaches your servlet. at the isavvix Code Exchange There is a multipart/form parser availailable from Anders Kristensen (http://wwwuk.commons.  Jason Hunter's MultipartRequest (available from http://www.hpl.hp. there are a number of libraries available that do. others return the data as an InputStream.request.quot.com/). Unfortunately. The servlet can use the GET method parameters to decide what to do with the upload while the POST body of the request contains the file data to parse. Jun Inamori has written a class called org.com) at http://www-uk. When the user clicks the "Upload" button.quot.com/people/ak/java/.com/) Apache Jakarta Commons Upload (package org. HttpMultiPartParser by Anil Hemrajani. high-performance.<INPUT TYPE='submit' VALUE='upload'> </FORM> The input type &amp.apache. encoded using the MIME-type multipart/form-data.ParseMime which is available in the Tomcat CVS tree.apache. the client browser locates the local file and sends it using HTTP POST.servlets.

setAge(request. f. // . See How can I access or create a file or folder in the current directory from inside a servlet? and other questions in the Servlets:Files Topic for information on writing files from a Servlet. The bean is then placed into the request.getRequestDispatcher ("/jsp/Bean1. and the call is then forwarded to the JSP page.getServletContext(). depending on your needs.jsp can then process fBean. } catch (Exception ex) { .jsp").setAttribute("fBean".. request. You have to ask the user for permission.f).FormBean f = new govi.. . or process it as an InputStream. f. //use the id to compute //additional bean properties like info //maybe perform a db query. response). f. Bean1. .Once you process the form-data stream into the uploaded file.getParameter("age")). write it to a database. } } The JSP page Bean1.setPersonalizationInfo(info). etc.getParameter("name")). String id = request.FormBean(). <jsp:useBean id="fBean" class="govi. by means of a request dispatcher for downstream processing.forward(request. and currently form-based upload is the only way to do that. you can then either write it to disk.FormBean" scope="request"/> <jsp:getProperty name="fBean" property="name" /> <jsp:getProperty name="fBean" property="addr" /> <jsp:getProperty name="fBean" property="age" /> <jsp:getProperty name="fBean" property="personalizationInfo" /> .setName(request. getServletConfig().getParameter("addr")).jsp. after first extracting it from the default request scope via the useBean action.setAddr(request. Please note that you can't access a file on the client system directly from a servlet. f. 6) How does a servlet communicate with a JSP page? The following code snippet shows how a servlet instantiates a bean and initializes it with FORM data posted by a browser.getParameter("id"). that would be a huge security hole. HttpServletResponse response) { try { govi. public void doPost (HttpServletRequest request.

it does not scale well. note that SingleThreadModel is pretty resource intensive from the server's perspective. Here. and are directly handled by the servlet's service() method in a concurrent fashion (i. you may be better off implementing explicit synchronization for your shared data. all the unserviced requests are queued until something becomes free . A JTA transaction must start and finish within a single invocation (of the service() method). followed by the _jspService() method. it may not help much even if you did add more memory and increased the size of the instance pool. The most serious issue however is when the number of concurrent requests exhaust the servlet instance pool. Once this servlet is dynamically compiled and loaded into memory. If you anticipate your users to increase in the future.e. which is responsible for request processing and replying to the client. users may experience a perceptible delay when a JSP page is accessed for the very first time. Do note that the lifetime of this servlet is non-deterministic . Note that this question does not address servlets that maintain and manipulate JDBC connections. 9) How does the performance of JSP pages compare with that of servlets? How does it compare with Perl scripts? The performance of JSP pages is very close to that of servlets. the JSP engine automatically invokes the jspDestroy() method allowing the servlet to free any previously allocated resources. Also. the jspInit() method is automatically invoked by the JSP engine upon loading the servlet. is to effectively minimize the amount of code that is synchronzied so that you take maximum advantage of multithreading. When this happens. However. The key however. Subsequent client requests to the JSP page do not result in a repeat of the translation phase as long as the servlet is cached in memory. 8) Can a servlet maintain a JTA UserTransaction object across multiple servlet invocations? No. and works well for low volume sites. Since the usage is non-deterministic. In that case.which results in poor performance. it follows the servlet life cycle for request processing.) . the service() method handles each client request within a seperate thread concurrently. including a connection's transaction handling. This is because the JSP page undergoes a "translation phase" wherein it is converted into a servlet by the JSP engine.it may be removed from memory at any time by the JSP engine for resource-related reasons.7) What's a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization? Although the SingleThreadModel technique is easy to use.

getServletContext(). IOException { .1+) . MyServlet ms=(MyServlet) getServletConfig(). If. } That said.Alex ] It depends on what you mean by "call" and what it is you seek to do and why you seek to do it.There have been some recent studies contrasting the performance of servlets with Perl scripts running in a "real-life" environment. (How it is defined depends on the engine. however. especially when they are running in a clustered environment. This whole apporach of accessing servlets in another servlets has been deprecated in the 2. AKA forwarding the request. 10) How do I call one servlet from another servlet? [ Short answer: there are several ways to do this. including     use a RequestDispatcher use a URLConnection or HTTPClient send a redirect call getServletContext().getServlet(name) (deprecated.servlets. . The results are favorable to servlets..MyServlet The code below shows how this named servlet can be accessed in the service method of another servlet public void service (HttpServletRequest request. doesn't work in 2.code=com... to invoke a servlet in JSDK a servlet can be named by the property myname. If the end result needed is to invoke the methods then the simplest mechanism would be to treat the servlet like any java object . The cleaner and better apporach is to just avoid accessing other servlets directly and use the RequestDispatcher instead.1 version of the servlet API due to the security issues. If the idea is to call the service method from the service method of another servlet. .. HttpServletResponse response) throws ServletException. you have to know the alias of the servlet. you want to gain access to the instance of the servlet that has been loaded into memory by the servlet engine. create an instance and call the mehods.) For example. you could use the RequestDispatcher object.getServlet("myname").sameer.

but also leads to confusion over what server is able to. and other issues as necessary. or a completely different product. load balancing. CORBA. Starting at the basic level. each of which may have one or more tasks it solves. Servlets. thread pools. typically returning HTML to the calling user. Code that executes within the server environment may be CGI driven. transaction processing. Custom.for instance. Apache requires that a servlet engine run in an external process. These application servers are usually stand-alone products. It may be generating a list of news items. If the server application is written as a Java Servlet. as well as an easy way to maintain state between each HTTP request. This web server must handle standard HTTP requests and responses. Depending on the application server. When you move on to Enterprise JavaBeans (and other J2EE components like JMS and CORBA) you move into the application server space. it will need a place to execute. Application Servers.) for the time being for purposes of clarity. a user is typically submitting a request to a system through a web browser. This persistance gives a servlet connection and thread pooling. programmers may use CORBA or RMI to talk to .11) What are all the different kinds of servers? (Such as Web Servers. perform a specific task. but the end result is that the web server will pass back HTML to the user. messaging. COM/DCOM. and require add-on products to add that capability. external. this engine may be internal. etc. and would execute within the same space/application as the servlets. Other servers. ASP. An Application Server is any server that supplies additional functionality related to enterprise computing -. unlike a traditional CGI environment where a CGI script is started upon each request to the server.. Netscape/iPlanet Enterprise Server builds the servlet engine directly into the web server and runs within the same process space. or should. which is the environment that beans will execute in. JSP pages are usually tied in with the servlet engine. database access classes. EJB Application Servers provide an EJB container. and developers would tie their servlets/JSP pages to the EJB components via remote object access APIs. such as MS IIS don't officially support servlets. and so on. There are many products that handle the web serving and the servlet engine in different manners. This engine is continually running. The web server may need to execute an application in response to the users request.) The web request must be received by a Web Server (otherwise known as an HTTP Server) of some sort. etc) The servers involved in handling and processing a user's request break down into a few basic types. or handling a form submission to a guest book. This flexibility gives developers a great deal of power over how applications will be created and deployed. Depending on the web server. and this container will manage transactions. (We are conveniently ignoring all other types of clients (RMI. or some other server-side programming language. and this place is typically called a Servlet Engine. and will communicate to the engine via TCP/IP sockets.

though providing some flexibility with simple screen changes. servlet engine. some may still wonder why servlets should be cast aside for JSP. they may not be appropriate for everyone.their beans. 12) Should I override the service() method? No. you would most likely use this type of product to manage/serve EJB instances.beasys. architecturally speaking. But even this approach. even developers have to be careful and ensure that there is no tight coupling between presentation and content. say SessionTimeoutNotifier. Still. you can view JSP as a high-level abstraction of servlets that is implemented as an extension of the Servlet 2. SessionTimeoutNotifier. while page designers can easily write a JSP page using conventional HTML or XML tools. as well as an EJB container. 13) How can my application get to know when a HttpSession is removed (when it time-outs)? Define a class. In fact. one thing that confuses the issue is that many application server providers include some or all of these components in their product. If you look at WebLogic (http://www.com/) you will find that WebLogic contains a web server... You can usually do this by adding a third-party HTML wrapper package like htmlKona to the mix. are here to stay. doPost() and doGet(). JSP processor. When the session is removed. create a helper method and call that at the beginning of e. You can implement valueUnbound() to do whatever you want. Create a SessionTimeoutNotifier object and add it to the user session. Now. 14) Why use JSP when we can do the same thing with servlets? [Original question: Why should I use JSP when there is already servlet technology available for serving dynamic content?] While JSP may be great for serving up dynamic Web content and separating content from presentation. If you need to do something regardless of whether the request is e.servlet. JMS facility. and. with their significant installed base. servlets are more suited for back-end developers because they are often written using an IDE -. while dedicated web servers handle the specific HTTP requests.HttpSessionBindingListener. that implements javax.g. but the baseline standard is to use JNDI to locate and create EJB references as necessary. you shouldn't use servlets indiscriminately. still . They are excellent for server-side processing. In practice. It provides a fair bit of housekeeping that you'd just have to do yourself. Theoretically a product like this could be used to handle all aspects of site development. a POST or a GET. When deploying servlets. For instance.valueUnbound() will be called by the servlet engine.1 API. The utility of servlets is not in question.g.a process that generally requires a higher level of programming expertise.http.

See the HTTP spec at W3C for more detail. 16) Can I get the path of the current servlet where it lives on the file system (not its URL)? Try using: request.net.getRealPath(request.Socket (on the applet side). So. 15) How do I send information and data back and forth between applet and servlet using the HTTP protocol? Use the standard java. In a worst-case scenario.Socket. then you must open up a persistent socket using java. Note: The servlet cannot initiate this connection! If the servlet needs to asynchronously send a message to the applet. JavaWeb server. or "roll your own" using java. what is the solution? One approach would be to use both JSP and servlet technologies for building application systems.net. processed its task and sent the ouptut to the next servlet in the list as the request object. if your presentation changed from HTML to DHTML.net. To chain servlets together. .does not shield you from a change in the presentation format itself. the first servlet in the list is invoked. you would still need to ensure that wrapper packages were compliant with the new format.. you may end up hardcoding the presentation within the dynamic content..). To accomplish this method. you need to configure your servlet engine (JRun. you have to specify a sequential list of servlets and associate it to an alias. When a request is made to this alias. 17) How can I daisy chain servlets together such that the output of one servlet serves as the input to the next? There are two common methods for chaining the output of one servlet to another servlet : ï‚· the first method is the aliasing which describes a series of servlets to be executed ï‚· the second one is to define a new MIME-Type and associate a servlet as handlers As I don't really use the second one. For example.ServerSocket and Threads (on the server side). I'll focus on the aliasing.URL class.getServletPath()) An example may be: out. if a wrapper package is not available.net.println(request. The output can be sent again to another servlets.getServletPath())). JServ .getRealPath(request. and java.

out. Any initialization code you need to run should be placed in the init() method since it gets called when the servlet is first loaded by the servlet container. public void doGet (. So when you invoke a request like http://localhost/servlets/chainServlet. you select the JSE service (JRun servlet engine) to access to the JSE Service Config panel. Just look at in their documentation to define an alias name.readLine().. You have just to define a new mapping rule where you define your chaining servlet. String data = b. b.) { PrintWriter out =res.. 19) How to handle multiple concurrent database requests/updates when using JDBC with servlets? All the dbms provide the facility of locks whenever the data is being modified.For example to configure JRun for servlet chaining.getWriter()..... internally the servlet srvA will be invoked first and its results will be piped into the servlet srvB. } } All the servlet srvB has to do is to open an input stream to the request object and read the data into a BufferedReader object as for example : BufferedReader b = new BufferedReader( new InputStreamReader(req.setContentType("text/html"). Since the servlet environment takes care of instantiating the servlet. rest.getInputStream() ) ). 18) Why there are no constructors in servlets? A servlet is just like an applet in the respect that it has an init() method that acts as a constrcutor.srvB. . The srvA servlet code should look like : public class srvA extends HttpServlet { .close(). It should work straigthforward with Java Web Server or Jserv too. There can be two scenarios: . Hope that it'll help.println("Hello Chaining servlet"). Let say /servlets/chainServlet for the virtual path and a comma separated list of servlets as srvA. an explicit constructor is not needed. After that you can format your output with the data.

getRequestURI(). like for instance FTP servlets. port. To reconstruct the absolute URL from the scheme.net. if (request. delegating data store to Session objects or to the ServletContext. request.getQueryString(). Of course. If database updates are on the same row then the rows are locked automatically by the dbms. In general stateless servlets are better because they scale much better and are cleaner code.1. out. always use HttpServlet. In this case there is no need to do additional programming. if you are using servlets the servlets will open multiple connections for different users.getScheme(). 2. This issue is dealt with in the JDBC documentation. 32) Why do GenericServlet and HttpServlet implement the Serializable interface? GenericServlet and HttpServlet implement the Serializable interface so that servlet engines can "hybernate" the servlet state when the servlet is not in use and reinstance it when needed or to duplicate servlet instances for better load balancing. server name. but for now. . 31) How can I get the absolute URL of a servlet/JSP page at runtime ? You can get all the necessary information to determine the URL from the request object. Programmers should be aware of this pitfall and implement servlets which are stateless as possible. I don't know if or how current servlet engines do this.getServerPort(). request. and it could have serious implications.getServerName(). The following code fragment will determine your page's absolute URL: String file = request. } URL reconstructedURL = new URL(request.toString()). It can get pretty confusing. URI and query string you can use the URL class from java. Multiple database updates on different rows. file). but they were trying to plan for future growth when they designed the spec.getQueryString() != null) { file += '?' + request. 20) What is the difference between GenericServlet and HttpServlet? GenericServlet is for servlets that might not use HTTP. it turns out that there's no such thing as FTP servlets. Maybe some day there will be another subclass. hence we have to send requests to the dbms repeatatively until the lock is released by dbms.println(URL. like breaking references to objects gotten in the init() method without the programmer knowing it. look up "Transactions" and "auto-commit".

34) How do servlets differ from RMI? What are the advantages and disadvantages of each technology? Servlets extend the server-side functionality of a website. It is way for an application to talk to another remote machine and execute different methods. This is the case of a form in a web page declared this way in html: <form method="GET"> or <form>. but the length of the parameters on the whole is limited. Even if the servlet talks to many other applications all over the world to get this information.33) How does one choose between overriding the doGet(). If you must respond to requests made by a client that is not using the HTTP protocol. This is the case of of a form in a web page declared this way in html: <form method="POST">. then convert this data into a static HTML/WML page for the client to see. it still looks like it happened at that website. This is the case of a browser requesting a web page. all the . doPost(). This means that it gets called by both incoming requests and the HTTP requests are given to the servlet as they are (you must do the parsing yourself). The HttpServlet instead has doGet() and doPost() methods that get called when a client request is GET or POST. The GenericServlet has a service() method that gets called when a client request is made. In this case the size of the parameters can be much greater. RMI (Remote Method Invocation) is just that . and service() methods? The differences between the doGet() and doPost() methods are that they are called in the HttpServlet that your servlet extends by its service() method when it recieves a GET or a POST request from a HTTP protocol request. Concluding. for example. A GET request is a request to get a resource from the server. you must use service(). if you must respond to GET or POST requests made by a HTTP protocol client (usually a browser) don't hesitate to extend HttpServlet and use its convenience methods.a way to invoke methods on remote machines. NOTE: the doGet() and doPost() methods (as well as other HttpServlet methods) are called by the service() method. This means that the parsing of the request is done by the servlet: you have the appropriate method called and have convenience methods to read the request parameters. A servlet can receive a request to get some information through EJB from one or more databases. It is also possible to specify parameters in the request. A POST request is a request to post (to send) form data to a resource on the server. Servlets communicate with other application(s) on that server (or any other server) and perform tasks above and beyond the "normal" static HTML document.

Using RMI. this solution does have firewall problems if the system is to be used over and Internet verses an Intranet. unless of course you used some kind of in-between lookup utility. The servlet will then set a pointer to the first line to be displayed in the page and the number of lines to display. 35) How can we use a servlet as a proxy for communications between two applets? One way to accomplish this is to have the applets communicate via TCP/IP sockets to the servlet. etc. you need only to know the web address and the pages displayed to you take care of calling the different servlets (or actions within a servlet) for you. The servlet would then use a custom protocol to receive and push information between applets. The Action in the form would point back to the servlet in the JSP page which would determine whether a next or previous button has been pressed and reset the pointer to previous pointer + number of lines and redisplay the page. Servlets (or JSP) are mainly used for any web-related activity such as online banking. which you could do with (of all things) servlets. you must bind the RMI server to an IP and port. and the client who wishes to talk to the remote server must know this IP and port. online grocery stores. and force a display of the page. The JSP page would have a scriplet to display data from the Java Bean from the start pointer set to the maximum number of lines with buttons to allow previous or next pages to be selected. Use a Java Bean to store the entire result of the search that you have found. With servlets. This returns a String array (or null) containing all the values of the parameter requested. These buttons would be displayed based on the page number (i. as you would with single-valued parameters. I should see the next/previous 10 records and so on. 36) How can I design my servlet/JSP so that query results get displayed on several pages. 10 records each and when the next link is clicked. use the getParameterValues() method. if first then don't display previous button).while appearing as if the action was being performed on the local machine. However.e. stock trading. 38) How can I pass data retrieved from a database by a servlet to a JSP page? One of the better approaches for passing data retrieved from a servlet to a JSP is to use the Model 2 architecture as shown below: . like the results of a search engine? Each page should display. 37) How do I deal with multi-valued parameters in a servlet? Instead of using getParameter() with the ServletRequest. say.

it is best to design your application such that you avoid placing beans into the session unless absolutely necessary. The bean can then be accessed within the JSP page via the useBean tag as: <jsp:useBean id="dbBean" class="com.. You can create a top servlet (say.especially if your servlets are running under a clustered or fault-tolerant architecture. //relative url for display jsp page ServletContext sc = getServletContext().. rd. IOException { response. HttpServletResponse response) throws ServletException. RequestDispatcher rd = sc. url=". ---------------------. a static page or any other legal value for SRC. res)..dbBean bean = new com. Of course.forward(req. look at each frame as a unique document capable of sending its own requests and receiving its own responses. out.dbBean().foo.getWriter()). //call setters to initialize bean req. Placing large objects within the session imposes a heavy burden on the performance of the servlet engine. PrintWriter out = new PrintWriter (response.foo.println("<html>").setAttribute("dbBean".setContentType("text/html").dbBean" scope="request"/> .println("<head>Your Title</head>"). 39) How can I use a servlet to generate a site using frames? In general.getRequestDispatcher(url). it can be placed within the request object and forwarded to a display JSP page as follows: com. Once the bean has been instantiated and initialized by invoking its setter methods by the servlet.foo. out..".Basically. <% //iterate through the rows within dbBean and //access the values using a scriptlet %> Also. . you need to first design a bean which can act as a wrapper for storing the resultset returned by the database query within the servlet. FrameServlet) that upon invocation creates the frame layout you desire and sets the SRC parameters for the frame tags to be another servlet. there may be additional design considerations to take care of . bean).SAMPLE ---------------------public void doGet(HttpServletRequest request.

println("<frame src=/servlets/DummyServlet? mode=full name=frm_2>").g. out.println("</body></html>"). out. and sending an HTTP message with content type "application/octet-stream". the browser makes sure that only one button per group name will be selected (at most).* cols=*>").close().println("<frame src=/servlets/DummyServlet? mode=small name=frm_3>"). in the general sense? HTTP tunneling is a general technique whereby arbitrary data may be sent via an HTTP connection to and from CGI scripts or Java Servlets on a Web server.println("<body>"). -------------------------. <input type="radio" name="topping" value="cheese" checked>Cheese <input type="radio" name="topping" value="pepperoni">Pepperoni . This is done by serializing the data to be transmitted into a stream of bytes. out.println("<frame src=/servlets/MenuServlet name=frm_1>").println("<frameset rows=12%. So you can just call request. out.70%.// definingthe three rows of Frames for the main page // top : frm_1 // middle : frm_2 // bottom : frm_3 out. HTTP tunneling is also referred to as Firewall tunneling. out. out.println("</frameset>"). the HTML spec assumes that a given group of buttons will have the same NAME and different VALUEs. out.getParameter("groupname"). radio buttons) using the same name? For radio buttons. 40) What is HTTP tunneling. 41) How do I handle FORMs with multiple form elements (e.END -----------------------------------------Where MenuServlet and DummyServlet provide content and behavior for the frames generated by FrameServlet.

define a servlet that gives a stock quote. 42) How do I separate presentation (HTML) from business logic (Java) when using servlets? Almost anybody who has ever written a servlet can identify with this one. But what are our choices here? There are two basic options. When that can happen.<input type="radio" name="topping" value="anchovies">Anchovies If the user selects "Pepperoni" then request.getParameterValues(). But then. 2. without discipline. your content/presentation and program logic are again meshed.getParameter("topping") will return the string "pepperoni". then use the <servlet> tag in a JSP page to embed the output. this brings up the same problem. 1. You could. it's lame to have to recompile and re-deploy every time you want an HTML element to look a bit different.. For lists using the <select multiple> FORM tag. but you can also duplicate other element types.getParameterValues("param") which returns a String[] you can iterate through. It's bad form (so to speak). use request. I think the ideal here is to completely separate the two. for instance. multiple values can be returned for the same parameter name.I know you're . We all know it's bad for to embed HTML code in our java source.. Use JSP: Java Server Pages allows you to embed Java code or the results of a servlet into your HTML. Use a templating/parsing system: Hmm. like Name 1: <input type="text" name="name" value="Dick"> Name 2: <input type="text" name="name" value="Jane"> These also get returned in an array by request.

res). Use SSI! Remember SSI? It hasn't gotten much attention in recent years because of embeddable scripting languages like ASP and JSP. This API will let you emulate SSI commands from a templating system. it really does pay to take this approach. but it's not that bad (see below). create it. context = new Properties().*. FileNotFoundException { HttpSession ses = req.servlet. if((context = (Properties)ses. It will let you execute any command on any system. and much more. but it still remains a viable option. I believe the best way is to use an API called SSI for Java from Areane. including executing java classes! It also comes with several utility classes for creating stateful HTML form elements. FileNotFoundException {doPost(req.www.. public class SSITemplatingServlet extends HttpServlet { private String templateFilesDirectory = "d:\projects\idemo\templates\".getValue("user. parses the file. IOException.. HttpServletResponse res) throws ServletException. IOException. tables for use with iteration. com.io.http. *saves the values.ssi.*. HttpServletResponse res) throws ServletException. so it's free and you can tweak it to your heart's content! You can read the SSI for Java documentation for detailed info. Properties context = null.servlet.areane. Here's the servlet: import import import import import javax. Plus.context")) == null) { //if properties doesn't already exist. and a group of HTML producers maintaining the interface.*. Processes the request.util. java. javax. and much more. you can have a group of programmers working on the Java code. but the following is an example of its use. //Holds path to template files /**Handles GET requests.*. To leverage it in the servlet world.} /**Handles all requests. } //Write parameters to Properties object . java.getSession(true). then feeds the file to the out stream*/ public void doPost(HttpServletRequest req.so read on. defers every request to the POST processor*/ public void doGet(HttpServletRequest req.*. So now you probably want to know how to do it.about to rant about re-inventing the wheel. It's also open source.

setContentType("text/html"). context). "right". curVal = req.write(res. how can a servlet ond differently for each button? The servlet will respond differently for each button based on the html that you have placed in the HTML page. context).parse(this. pass the servlet the template file name. and have at it! 43) For an HTML FORM with multiple SUBMIT buttons. SsiPage page = SsiParser. Let's explain. String curName. //Stream to the client } } page = null.putValue("user. while(paramNames. "up" or "down".getParameterNames(). A simple comparision in the servlet with the these values could occur and processing based on the submit button would be performed.hasMoreElements()) { curName = (String)paramNames. //clean up Now. context. } //Save the values to the session ses. For a submit button the HTML looks like <input type=submit name="Left" value="left">. .getParameter("template").getParameter(curName). curVal). curVal. A servlet could extract the value of this submit by using the getParameter("Left") from the HttpRequest object. //Parsing occurs here page. // Get the file name of the template to use res. It follows then that if you have HTML within a FORM that appears as: <input <input <input <input type=submit type=submit type=submit type=submit name="Direction" name="Direction" name="Direction" name="Direction" value="left"><br> value="right"><br> value="up"><br> value="down"><br> Then the getParameter("Direction") from the HttpRequest would extract the value pressed by the user.getWriter().context".Enumeration paramNames = req.setProperty(curName. either "left".nextElement(). //Parse the page and stream to the client String templateName = req. just create a template file.templateFilesDirectory + templateName).

each of these values could be extracted using the getParameter() call and acted on. the divisions between the three layers are often blurry. you can't. Just extend HttpServlet. common practice would be to use one name and multiple values to identify the button pressed. then the config object will get lost. in a three-tier architecture.init(config) in the init method of a servlet? Just do as you're told and you won't get hurt! :-) Because if you don't. probably through its administration interface/tool (like Webshpere or JWS). As long as you subclass GenericServlet/HttpServlet. you can configure it through a property sheet-like interface. The main point of the term is.for submit buttons with different names on a page. you want somewhere to store the logic and "business rules" (another buzzword) of your application. the middle tier comprises these objects. However. 45) How can I explicitly unload a servlet or call the destroy method? In general. in a situation where there are multiple buttons. 47) Why do we need to call super. It makes sense. you are automatically Serializable. and business logic is more of an ideal than a reality in most programs. 46) What is a servlet bean? A servlet bean is a serializable servlet that follows the JavaBeans component architecture. business logic is any code that is not specifically related to storing and retrieving data (that's "data storage code"). Most servlet engines will also destroy and reload your servlet if they see that the class file(s) have been modified. for many reasons. when you install the servlet in the web server. If your web server supports them. to store this business logic in separate objects. use init() (no parameters) and it'll all work ok. Your servlet engine (ie the implementation of the interfaces in the JSDK) might provide a way to do this. . basically offering getter/setter methods.Similiarly. However. The Servlet API does not specify when a servlet is unloaded or how the destroy method is called." :-) More precisely. 44) What is meant by the term "business logic"? "Business logic" is just a fancy way of saying "code. while keeping the division between tiers clear and clean. or to formatting data for display to the user (that's "presentation logic").

your applications requirements may vary. Select service (Web service) 4. . Access tool (http://hostname:9090) 2. 1-What is the most efficient way of serving pages from a Java object?.init(config). processing speed) way to create a server application that accesses a database: A Servlet using JDBC. or JSP combined with a Servlet? Are these my only choices? Your question really should be broken in two. Althought if you are going to change the static content of the page often is going to be a pain because you'll have to change Java code. In this case.A convenience method which can be overridden so that there's no need to call super.e. Administration tool is located on port 9090 on your web server. Again. JAVA WEB SERVER comes with remote Web administration tool. the performance bottleneck is usually the database. Of course. If JDBC is the way you want to go the I'd suggest to pick as many drivers as you can (II. There you have a clear winner in the Servlet.III.From the Javadoc: init() . 49) Which is the most efficient (i. not the web server/engine. For database applications. But. 50) How can I change the port of my Java Web Server from 8080 to something else? It is very simple. the preferred term now is "servlet container" since that applies both to plug-in engines and to stand-alone web servers that support the Servlet API. the difference in speed between JSP pages and raw servlets can be so small that is not worth the extra work of servlet programming. a JSP page using a JavaBean to carry out the db access. The second place in speed is for JSP pages. You will get a popup screen with all settings. depending on your application. Type I uses a JDBC/ODBC bridge and usually has lousy performance. Enter User Id/Password (by default it is admin/admin) 3. You can access this with a web browser. 48) What is a servlet engine? A "servlet engine" is a program that plugs in to a web server and runs servlets. To change port address for web server: 1. The term is obsolete. Click on "manage" button.IV or wathever) and benchmark them. the use of a package that access JDBC with connection pooling at the application level used from JSP pages (with or withouth beans as middleware) is the usual choice. 2-What is the most efficient way of accessing a database from Java?. go for the simplest (usually type IV driver) solution if that meets you performance needs.

but with the password transmitted in an encrypted form. . That doesn't even make sense :-) You can. It can be associated with protection or user domains. 7. Servlet/JSP or script generated) for logging in. 51) Can I send multiple responses for a single request? No. possibly to the same servlet with different parameters. It indicates the HTTP realm for which access is being negotiated and sends passwords with base64 encoding. For completeness I list all of them with a description of their nature: 1. Form Based Login A standard HTML form (static.) 2. what servlet containers support it? Form based login is one of the four known web based login mechanisms. HTTPS Authentication (SSL Mutual Authentication) This security mechanism provides end user authentication using HTTPS (HTTP over SSL). (See RFC2068 for more information.5. but less then HTTPS Authentication which uses private keys. The major advantage is that the look and feel of the login screen can be controlled (in comparison to the HTTP browsers' built in mechanisms). On right hand side you will get text box for entering port no. 52) What is FORM based login and how do I use it? Also. HTTP Digest Authentication Like HTTP Basic Authentication. Click on network tree node. send a "redirect". click on restart button. however. Change port number with desire one. and is used to authenticate previously unauthenticated users. 3. 4. It performs mutual (client & server) certificate based authentication with a set of different cipher suites. Search this FAQ on "redirect" to learn more. HTTP Basic Authentication An authentication protocol defined within the HTTP protocol (and based on headers). Yet it is not currently in widespread use. It is more secure than Basic. therefore it is not very secure. 6. which tells the user's browser to send another request.

5. The generated pages can include wml. 54) How can the data within an HTML form be refreshed automatically whenever there is a change in the database? JSP is intended for dynamically generating pages.3 Required Login Mechanisms). the requirements and the naming conventions of form based login and I suggest to take a look at it.To support 1.getServletContext(). (User Authentication. Here is a sample of a conforming HTML login form: <form method="POST" action="j_security_check"> <input type="text" name="j_username"> <input type="password" name="j_password"> </form> Known Servlet containers that support FORM-based login are: • • iPlanet Application Server Tomcat (the reference implementation of the Java Servlet API) 53) How do I capture a request and dispatch the exact request (with all the parameters received) to another URL? As far as i know it depends on the location of the next target url.forward(request. Here is an example code about using forward:      RequestDispatcher rd = null. Web Client) for more detailed descriptions of the mechanisms.. but containers are encouraged to support it. and 4. (HTTP Digest Authentication is not a requirement.4.) You can also see section 3. Thus any Servlet container that conforms to the J2EE Platform specification should support form based login.2 Specification describes/specifies the same mechanisms in 11.. then you can use the forward method.5. When you have a generated page. 3.3) describes in depth the nature. response). ServletContext ctx = this. 3. html.. • If the next servlet url is in the same host.1. From this moment you have a page. String targetURL = "target_servlet_name". the Servlet 2. rd.5 including form based login in 11.11. .. of these authentication mechanisms is a requirement of the J2EE Specification (as of v1. To be more specific. rd = ctx. JSP has already made its work.3.2. This section (11.3. dhtml or whatever you want.1 of the J2EE Specs.getRequestDispatcher(targetURL).

If a server can reload a browser without its allow. html pages. This way you can load new information inside the applet or try to force a page reload. A web application is rooted at a specific path within a web server. Variables can be sent as: <jsp:forward page=/relativepath/YourServlet> <jsp:param name="name1" value="value1" /> <jsp:param name="name2" value="value2" /> </jsp:forward> You may also pass parameters to your servlet by specifying response.If you want automatic refreshing.sendRedirect("http://path/YourServlet?param1=val1"). a catalog application could be located at http:// www.it could use the showDocument() call to reload the current page. and other resources that can be bundled and run on multiple containers from multiple vendors.mycorp. 57) Can there be more than one instance of a servlet at one time ? . The browser is the one who fetches url's since the http protocol is requestresponse based. it implies that we could be receiving pages which we haven't asked for from servers. could be simpler using an automatic JavaScript refreshing function that force page reload after a specified time interval. May you could use applets and a ServerSocket for receiving incoming signals from the server for changed data in the DB. then this should be acomplished by the technology included in the generated page (JSP will tell only what to include in the page). All requests that start with this prefix will be routed to the ServletContext which represents the catalog application. 56) How can I call a servlet from a JSP page? How can I pass variables from the JSP that the servlet can access? You can use <jsp:forward page="/relativepath/YourServlet" /> or response. 55) What is a web application (or "webapp")? A web application is a collection of servlets. [That's a nice idea -. -Alex] Perhaps (if possible). It could also use HTTP polling instead of maintaining an expensive socket connection. classes. The browser can not be loaded by extern factors.com/catalog.sendRedirect("http://path/YourServlet"). For example.

read(data)) > 0) { out.currentTimeMillis().flush().getOutputStream(). Which is a process in which you pass the output of one . For example.start) + "ms to download " + filename). including     Request Dispatching HTTP Redirect Servlet Chaining HTTP request (using sockets or the URLConnection class) Shared session. FileInputStream fin = new FileInputStream(filename). 59) What is inter-servlet communication? As the name says it. byte data[] = new byte[1024]. this can occur where there was more than one servlet definition that utilized a specific servlet class with different initialization parameters. long start = System. especially topic Message Passing (including Request Dispatching) for information on each of these techniques. String filename = getServletContext(). int len = 0. Servlets talking to each other. log("took " + (stop .currentTimeMills(). it is communication between servlets. or application objects (beans) Direct method invocation (deprecated) Shared static or instance variables (deprecated)    Search the FAQ. 58) How can I measure the file downloading time using servlets? ServletOutputStream out = response.getQueryString()). while ((len = fin. } out. This can also occur when a servlet implements the SingleThreadModel interface and the container creates a pool of servlet instances to use. [There are many ways to communicate between servlets.It is important to note that there can be more than one instance of a given Servlet class in the servlet container.write(data. long stop = System. 0.getRealPath(request. -Alex] Basically interServlet communication is acheived through servlet chaining. request. len).

e.getServletDetails(). There are some Servlet engine specific configurations for servlet chaining.getServletContext(). You must be careful when you call another servlet's methods. If the servlet that you want to call implements the SingleThreadModel interface.servlet as the input to other. ServletContext.) In this case. Servlets can also call public functions of other servlets running in the same server. You can pass in the current request and response object from the latest form submission to the next servlet/JSP.g. This could be done by opening a URL connection to the desired Servlet.getServlet("Ot herServlet"). you can modify the web. (The server cannot intervene and make sure your call happens when the servlet is not interacting with another client. otherServletDetails= Test.g.getRequestDispatcher(HttpRequest.xml in $TOMCAT_HOME/webapps/myApp/WEB-INF to add a url-pattern: <web-app> <servlet> <servlet-name> myServlet </servlet-name> <servlet-class> myServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name> myServlet </servlet-name> <url-pattern> /jsp-bin/* </url-pattern> </servlet-mapping> </web-app> . your call could conflict with the servlet's single threaded nature. 60) How do I make servlet aliasing work with Apache+Tomcat? When you use Tomcat standalone as your web server. This can be done by obtaining a handle to the desired servlet through the ServletContext Object by passing it the servlet name ( this object can return any servlets running in the server). your servlet should make an HTTP request to the other servlet instead of direct calls. e. Servlets could also invoke other servlets programmatically by sending an HTTP request. These servlets should be running in the same server. TestServlet test= (TestServlet)getServletConfig().forward("NextServlet") . HttpResponse). And then calling the function on the returned Servlet object. You can modify these objects and pass them so that the next servlet/JSP can use the results of this servlet.

the number of concurrent connections accepted by Tomcat 3. since tomcat re-generates the conf file every time it starts): <LocationMatch /myApp/jsp-bin/* > SetHandler jserv-servlet </LocationMatch> This lets Apache turn over handling of the url pattern to your servlet. the pathname must begin with '/' and is interpreted relative to the root of the webapp. Graeme Wallace provided this trick to remedy the situation.1. To illustrate. A resource can be another servlet. you can use either the ServletRequest. or a JSP file. 62) What is a request dispatcher and how does it work? A RequestDispatcher object can forward a client's request to a resource or include the resource itself in the response back to the client.getRequestDispatcher() method.html instead of: http://webserver:8080/myApp/servlet/myServlet/stuff.This will let you use: http://webserver:8080/myApp/jspbin/stuff. However. or an HTML file. If they are both in the same directory. you could accomplish this by incorporating the following code fragment in either the service method or the doGet method of Servlet_A: . etc. suppose you want Servlet_A to invoke Servlet_B. They both do the same thing. but impose slightly different constraints on the argument path. 61) Is there any way to determine the number of concurrent connections my servlet engine can handle? Depends on whether or not your servlet container uses thread pooling.1. For the former. is 10. For the latter. You can also think of a RequestDispatcher object as a wrapper for the resource located at a given path that is supplied as an argument to the getRequestDispatcher method.html But it won't work on port 80 if you've integrated Tomcat with Apache. If you do not use a thread pool. the information on how to do so is supplied with the documentation in the TOMCAT_HOME/doc/uguide directory. For Tomcat 3. you can specify the number of concurrent connections to be accepted by the container.conf (or to a static version of it. Add the following to your tomcat-apache.getRequestDispatcher() method or the ServletContext. This you can see for yourself by testing a servlet with the Apache JMeter tool. for example. it looks for the resource in the same webapp to which the invoking servlet belongs and the pathname specified can be relative to invoking servlet. if your servlet container uses a thread pool. For constructing a RequestDispatcher object.

There can be multiple contexts in a single servlet container. 63) What is a Servlet Context? A Servlet Context is a grouping under which related servlets (and JSPs and other web resources) run. In addition to these types of containers. Read the JavaDoc for javax. the relative URL must be relative to the current servlet.forward( request.getRequestDispatcher( "/servlet/Se rvlet_B" ). The originally called servlet has passed the control to the current servlet. The ServletContext object is used by an individual servlet to "call back" and obtain services from the container (such as a request dispatcher).RequestDispatcher dispatcher = getRequestDispatcher("Servlet_B"). dispatcher. These are an integral part of the web server.forward( request. and other resources. They can share data. URL namespace.servlet. of type HttpServletRequest. is the first parameter of the enclosing service method (or the doGet method) and response. where request. 65) What is the difference between in-process and out-of-process servlet containers? The in-process Servlet containers are the containers which work inside the JVM of Web server. You can maintain "application global" variables by using Servlet Context Attributes. poor in performance but better in scalibility In the case of out-of-process containers. web server and container talks with each other by using the some standard mechanism like IPC. and now current servlet is acting as controller to other resourses. of type HttpServletResponse. the second. there is 3rd type which is stand-alone servlet containers. . 64) Does the RequestDispatcher expect a relative URL to be relative to the originally-called servlet or to the current servlet (if different)? Since the RequestDispatcher will be passing the control (request object and response object) from the current Servlet. response ).ServletContext for more information. these provides good performance but poor in scalibility. The out-of-process containers are the containers which work in the JVM outside the web server. dispatcher. response ). You could accomplish the same by RequestDispatcher dispatcher=getServletContext().

3. Thread pooling merely eliminates the overhead associated with the creation and destruction of threads as a servlet container tries to respond to multiple requests received simultaneously. addresses the issue of thread safety. 67) Which servlet containers have persistent session support? Specifically. All Tomcat servlet containers support session tracking. it seems to use only one of those instances.66) How is SingleThreadModel implemented in Tomcat? In other containers? [I would assume that Tomcat uses its connection thread pool.1? All servlet containers that implement the Servlet 2. the document does indeed address the issue of thread safety and how and when to use SingleThreadModel servlets.2 API is silent on the subject of thread pooling -. instead of sharing one instance among all threads. My experiments show that Tomcat 3. It is for this reason that the specification document for Servlet 2.3. However. does Tomcat 3. 68) Can I use JAAS as the authentication technology for servlets ? . Is that true?] The question mixes together two rather independent aspects of a servlet container: "concurrency control" and "thread pooling"." Obviously. such as achieved by having a servlet implement the SingleThreadModel interface. but only for the first batch of requests received concurrently.2 API Specification document says that if a servlet implements the SingleThreadModel it is guaranteed "that only one request thread at time will be allowed in the service method. Whether or not a servlet container does that depends completely on the implementation.1 of the Servlet 2." It says further that "a servlet container may satisfy this guarantee by serializing requests on a servlet or by maintaining a pool of servlet instances. and creates a new instance of the servlet for each connection thread.as it is merely an implementation detail. A servlet will be thread-safe or thread-unsafe regardless of whether the servlet container used a thread pool. for superior performance you'd want the servlet container to create multiple instances of a SingleThreadModel type servlet should there be many requests received in quick succession. Concurrency control.2 API must provide for session tracking through either the use of cookies or through URL rewriting. Section 3. For subsequent batches of concurrent requests.1 does indeed create multiple instances of a SingleThreadModel servlet.

please submit feedback with information on these.2 spec defines a load-on-startup element for just this purpose. If no value is specified. One important feature of JAAS is pure Java implementation. Put it in the <servlet> section of your web. 71) Is there a way to disable a user's ability to double-click a submit image/button (and therefore submitting duplicate data -. Lower integers are loaded before higher integers. 72) What are the main differences between Servlets and ISAPI? . JAAS can be used as authentication technology for servlets. Have the handler check if a flag is set and if not set the flag and submit the form and then clear the form. or if the value specified is not a positive integer. It is either empty (<load-on-startup/>) or contains "a positive integer indicating the order in which the servlet should be loaded. an applet.Yes. rather than on the first request? The Servlet 2. <servlet> <servlet-name>foo</servlet-name> <servlet-class>com." For example. The JAAS infrastructure is divided into two main components: an authentication component and an authorization component. 70) Is it possible to write a servlet that acts as a FTP server? Yes.Foo</servlet-class> <load-on-startup>5</load-on-startup> </servlet> Some servlet containers also have their own techniques for configuring this. the container is free to load it at any time in the startup sequence.multiple submits)? Is there a way to do this with Javascript? Give the submit image (or button) an onClick() handler. 69) How can I set a servlet to load on startup of the container.xml deployment descriptor. regardless of whether the code is running as an application. or a servlet. It would spawn a thread that opens a ServerSocket. The JAAS authentication component provides the ability to reliably and securely determine who is currently executing Java code. then listens for incoming connections and speaks the FTP protocol. a bean.servlets.foo.

xml you can use a mime-mapping to map the type with a certain extension and then map the servlet to that extension. 73) Can I associate a servlet with a particular mime-type. my servlet will be executed? In web. implemented as member functions of the CHttpServer object in the DLL. ï‚· Content generation and content presentation can be done seperately Servlets with the help of JSP. ISAPI can connect to Databases through only ODBC ï‚· Servlets have access to many server-side technologies like EJB and etc. ISAPI Filters provide the capability of pre-processing and post-processing of all data sent between the client and the server ï‚· Java is the only choice for writing Servlets. ISAPI allows multiple commands in one DLL. so if the client requests a file of that type. ISAPI code has to generate HTML code in itself. ISAPI works on only ISAPI-compliant Web server (for example. Other Differences are: ï‚· Servlet is a simple .class file and ISAPI is a DLL ï‚· Servlets run in the Servlet containers and may be in-process or out of process. ISAPI is limited in scope ï‚· Multiple commands can be implemented in a servlet by using pathinfo.The first difference is obviously that Servlets is the technology from Sun Microsystems and ISAPI is from Microsoft.g. Microsoft Internet Information Server) ï‚· Servlets can connect to the Databases through JDBC as well as jdbc-odbc bridges. e. <mime-mapping> <extension> zzz . ISAs run in the same address space as the HTTP server ï‚· Servlet container preprocesses and postprocesses the data communication between the client and server. VC++/MFC is used to write ISAPI code ï‚· Servlets works on most of the Web servers plus third party containers can be integrated with other web servers to provide servlets on them.

cookie). for instance. The following statement. sets a new cookie with a minimum number of attributes: document. The value of document. of name=value pairs for each cookie that matches the current domain. It consists. 74) What are the different cases for using sendRedirect() vs. the servlet gets called. If you don't need to preserve the request/response objects. In this case you won't be sending the original request/response objects. you must use getRequestDispatcher or getNamedDispatcher. you can use either. when a file for type zzz is requested.cookie is a string containing a list of all cookies that are associated with a web page. path. And the following statement displays the property's value: alert(document. for example. then you must use sendRedirect.</extension> <mime-type> text/plain </mime-type> </mime-mapping> <servlet-mapping> <url> *.cookie = "cookieName=cookieValue". might be the following string: . If you want to dispatch to resources OUTSIDE the context. but you will be sending a header asking to the browser to issue a request to the new URL.zzz </url> <servlet-name> MyServlet </servlet-name> </servlet-mapping> So. and date. getRequestDispatcher()? When you want to preserve the current request/response objects and transfer them to another resource WITHIN the context. 75) How do I access the value of a cookie using JavaScript? You can manipulate cookies in JavaScript with the document. and retrieve one by reading its current value.cookie property. You can set a cookie by assigning this property.cookie property. The value of the document. that is.

76) How do I write to a log file using JSP under Tomcat? Can I make use of the log() method for this? Yes.xml configuration file.print(0)" value="Print This Page"> 78) How do you do servlet aliasing with Apache and Tomcat? Servlet aliasing is a two part process with Apache and Tomcat. However. First. e. you must map the request in Apache to Tomcat with the ApJServMount directive. you can use the Servlet API's log method in Tomcat from within JSPs or servlets.cookieName1=cookieValue1.MyServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>/myservlet</url-pattern> </servlet-mapping> . Also. ApJServMount /myservlet /ROOT Second. so you can't completely automate this. These messages are stored in the server's log directory in a file called servlet. The browser will still confirm the print job with the user. you'll be printing whatever the browser is displaying (it will not reliably print plug-ins or applets).mypackage. Here is a sample exerpt: <servlet> <servlet-name>myservlet</servlet-name> <servlet-class>com.log. 77) How can I use a servlet to print a file on a printer attached to the client? The security in a browser is designed to restrict you from automating things like this. [The JavaScript source code for doing this is: <input type="button" onClick="window. you must map that url pattern to a servlet name and then to a servlet class in your web..g. cookieName2=cookieValue2. so normally you are restricted to HTML and images. you can use JavaScript in the HTML your servlet returns to print a frame.

jsp extension? yes you can do that by modifying the web. following code should help you: //assume you have a HttpServletRequest request if(request. they're unavailable on distributed applications.JspServlet for all the requests having extension . You can do that by changing the Servlet mapping code: <servlet-mapping> <servlet-name> jsp </servlet-name> <url>*. and ServletContext attributes? A ServletContext attribute is an object bound into a context through ServletContext.setAttribute() method and which is available to ALL servlets (thus JSP) in that context. session attributes. . So.xml file.html files within a given context as JSP? Or. do JSP files have to end with a .getSession(false)==null) { //no valid session (timeouted=invalid) //code to redirect to login page } 80) Can Tomcat be configured to interpret all.apache. or selected.79 ) I want my servlet page to redirect to a login page if the session has timed out.html</url> </servlet-mapping> And comment out the following block <mime-mapping> <extension> html </extension> <mime-type> text/html </mime-type> </mime-mapping> 81) What is the difference between request attributes. You will have to invoke the org.runtime.jasper.html. By definition a context attribute exists locally in the VM where they were defined. . How can I know if my session has timed out? If the servlet engine does the time-out. or to other contexts via the getContext() method.

They're also unavailable to different JVMs in distributed scenarios. Thus we can say that context attributes are meant for infrastructure such as shared connection pools. The DB connection is managed by a singleton object.. and each context uses a login servlet and the login servlet connects to a DB.)  . 82) Are singleton/static objects shared between servlet contexts? [Question continues: For example if I have two contexts on a single web server. especially if you have any sort of pooling. which usually happens with sessions without a rigorous control strategy. and request attributes are meant to specific request info such as query results. I mean anything which might be used by more than one request. The classes loaded from context's WEB-INF directory are not shared by other contexts.) and by the container. Anything which you include in a HttpSession. Typical examples include:  Connections to external servers. Request attributes are bound to a specific request object. So if you have exactly the same DBConnection class in WEB-INF/classes directory of two different contexts. each context gets its own copy of the singleton (static) object. 83) When building web applications. They're used more as comunication channel between Servlets via the RequestDispatcher Interface (since you can't add Parameters. as a mean to provide state to a set of related HTTP requests. what are some areas where synchronization problems arrise? In general.Session attributes are bound to a session. Do both contexts have their own instance of the DB singleton or does one instance get shared between the two?] It depends on from where the class is loaded. By shared resource. session attributes to contextual information such as user identification. Objects can be notified when they're bound/unbound to the session implementing the HttpSessionBindingListener interface. Session attributes are available ONLY to those servlets which join the session.. Request attributes are very useful in web apps when you must provide setup information between information providers and the information presentation layer (a JSP) that is bound to a specific request and need not be available any longer. (Your user could open many browser windows and make many simultaneous requests within the one session. whereas classes loaded from CLASSPATH are shared. you will run into synchronization issues when you try to access any shared resource. and they last as far as the request is resolved or while it keep dispatched from servlet to servlet.

84) What is the difference between apache webserver. 85) How can you embed a JavaScript within servlets / JSP pages? You don't have to do anything special to include JavaScript in servlets or JSP pages. java webserver and tomcat server? Apache is an HTTP server written in C that can be compiled and run on many platforms. It's a fundamental limitation of the HTTP protocol. Tomcat is an open-source HTTP server from the Apache Foundation. written in Java. It will run back on the client when the browser loads the generate HTML. Log destinations. native-code web server). 86) How can I make a POST request through response. with the included JavaScript. just like you would include it in a raw HTML page. Java WebServer is an HTTP server from Sun written in Java that also supports Servlets and JSP. Just have the servlet/JSP page generate the necessary JavaScript code. The key thing to remember is it won't run in the server. . It can also be used as a "plug-in" to native-code HTTP servers.setStatus() and response.setHeader() methods? You can't. You'll have to figure out some other way to pass the data. not from the client Store data in cookies instead of passing it via GET/POST 87) How do I pass a request object of one servlet as a request object to another servlet? Use a Request Dispatcher. such as    Use GET instead Make the POST from your servlet.sendRedirect() or response. that supports Servlets and JSP. to provide support for Servlets (while still serving normal HTTP requests from the primary. such as Apache Web Server and IIS. if you do your own logging from your servlets.

jsp"> Shoe size: <INPUT NAME="shoesize"> <INPUT TYPE="SUBMIT"> </FORM> Then in the servlet.. back to the JSP? (RequestDispatcher. from a jsp. The best way to establish a default occurrence (the servlet handles a request at a time) is to synchronize the access to the global variable or alternatively to create a servlet that implements the SingleThreadModel interface. and have the servlet call sendRedirect to go back to the JSP.getRequestURI will return the uri as contained in the action tag of the form. and a reference to the Servlet Context the servlet is running in. What will happen to this global variable if two requests hit on the same time? What will happen is an unforeseeable event. For example: <FORM ACTION="/foo/myservlet"> <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="/foo/thisjsp..sendRedirect(request.88) I call a servlet as the action in a form. as I do not know which resource has made the request.) You'll have to pass the JSP's URI in to the servlet. getServletContext is the most valuable method. and why is it useful? The ServletConfig object is an interface. request. which is not what is needed. It contains the methods getInitParameter getInitParameterNames getServletContext getServletName You can use the methods to determine the Servlet's initialization parameters. How can I redirect the response from the servlet. . the name of the servlets instance. as it allows you to share information accross an application (context).forward will not help in this case. response.getParameter("redirect")). 89) What is the ServletConfig object. 90) I have a global variable in a servlet class.

such as the application server's context. server1 and server2.getParameter(). using request. value and expiration date as request parameters. you can bind this information to a context that is accessible to all servlet contexts. using request. This way.2 specification allows you to specify an error page (a servlet or a JSP) for different kinds of HTTP errors or ServletExceptions.sendRedirect(). You can specify this in deployment descriptor of the web application as: . Creates a similar cookie. value and expiration date request parameters. 2. you can keep the data you want to share in memory. using response.  92) How can I pass data from a servlet running in one context (webapp) to a servlet running in another context? There are three ways I can think of off the top of my head: 1. If persisting this information is not an option.getCookies() Redirects to WriteCookieServlet running on server2. One servlet could foward a request to another servlet and include the data that needs to be shared as parameters in the request. Store the information you want to share in a persistant format.that is.HTTP. 3.91) Suppose I have 2 servers. Have a ReadCookieServlet running on server1 that   Reads the cookie. such as in a file system or database. Use the old fashion way of passing information to a servlet . a servlet or JSP to report errors of other servlets? The Servlet 2.addCookie(). passing the cookie name. How can I take data in a cookie from server1. That way. Have a WriteCookieServlet running on server2 that  Reads the cookie name. any servlet that is running in a JVM that can "see" these resources can get to this information. and send it to server2? You'll have to create a (new) similar cookie on server 2. using response. 93) How can I write an "error page" -.

xml deployment descriptor. This object defines how a servlet is to be configured is passed to a servlet in its init method. This is where the ServletConfig comes in. That is because the same servlet can be used in several web applications at one time. The container. not in the referenced classes. therefore. Most of the Servlet containers reload the servlet only it detects the code change in the Servlet.<error-page> <exception-type>FooException</exception-type> <location>/error. each possibly having different configurations. In fact. in turn. All servlets instances running in the same context are part of the same web application and. if you have mentioned <Context path="/myApp" docBase="D:/myApp/webDev" crossContext="true" debug="0" . The web container invokes this servlet in case of errors.1 API. 95) Under what circumstances will a servlet be reloaded? That depends on the Servlet container. this may be common if there is a generic controller servlet that can be configured at run time for a specific application. you would have several instances of the same servlet running. and a message. exception type. A servlet accesses these shared resource (such as a RequestDispatcher and application properties) through the ServletContext object. Most servlet containers provide a way to configure a servlet at runtime (usually through flat file) and set up its initial parameters. This notion of a web application became very significant upon the Servlet 2. not servlet. 94) What is the difference between ServletContext and ServletConfig? A ServletContext represents the context in a servlet container of a servlet instance operates. In Tomcat's server. share common resources. Then. passes these parameters to the servlet via the ServetConfig.jsp</location> </error-page> where FooException is a subclass of ServletException. and you can access the following information from the request object of error servlet/JSP: error code. where you could deploy an entire web application in a WAR file. Notice that I always said "servlet instance". A servlet container can have several contexts (or web applications) at one time. Each servlet instance is running in one of these contexts.

getContextPath(). 96) What is a Servlet Filter? A filter is basically a component that is invoked whenever a resource is invoked for which the filter is mapped.gif"> </BODY> or write out a BASE tag like: <% String base = request.gif"> will be corrupt. 98) How can I return a readily available (static) HTML page to the user instead of generating it in the servlet? . 97) I am using the RequestDispatcher's forward() method to redirect to a JSP. The resource can be something like a servlet. You will have to change the timestamp of the servlet or stop-start the server to have the new class in the container memory. A filter normally works on the request. How do I solve this problem? You can use absolute urls like: <BODY> <% String base = request. or a URL pattern. then the Servlet will not get loaded. it will call the destroy on the currently loaded Servlet and reload the new code. %> <HEAD> <BASE HREF="<%=base%>"> </HEAD> <BODY> <IMG src="img/pic. But if the class that is referenced by the Servlet changes. %> <IMG src="<%=base%>/img/pic. response.gif"> </BODY> That should take care of the problem. The problem is that the jsp's url is now relative to the servlet's url and all my url's in the jsp such as <img src="pic.reloadable="true" trusted="false" > </Context> The reloadable = true makes the magic.getContextPath(). or header attributes. Every time the Servlet container detects that the Servlet code is changed. and does not itself send a response to the client.

getServletContext() . a servlet that does not declare SingleThreadModel usually has one and only one instance. } else { this. where a non-static variable -. 8. shared among all concurrent requests hitting that servlet. 4.html"). According to the Servlet specification.sendRedirect("page2. If your application server is set up in combination with a normal web server like Apache.forward(). 11.sendRedirect("page1.getRequestDispatcher("page2.To solve your problem. 10. 12. you have to open the file manually and copy their content to the output writer. } RequestDispatcher: A request dispatcher can be obtained through the ServletContext. you can either send a "Redirect" back to the client or use a RequestDispatcher and forward your request to another page: 1. 6. } 2. If they are located somewhere else on your filesystem. You have to be very careful about synchronizing access to shared data. 9. in servlets (and other multithreaded applications).getServletContext() . a static variable is shared among all instances of a class.also called an instance variable -. That means that. if(condition) { this. 7. that the pages are available in you document root.forward(). 5. you should use solution (1). } else { response. 3.getRequestDispatcher("page1. 14. 13.html"). It can be used to include another page or to forward to it. since it is shared among all threads.html"). an instance variable behaves very much like a static variable. Both solutions require. because the the web server usually serves static files much faster than the application server. . Redirect: A redirection is made using the HttpServletResponse object: if(condition) { response.html"). 99) What is the difference between static variables and instance variables in a servlet? According to the Java Language definition.is specific to a single instance of that class.

Struts encourages application architectures based on the Model 2 approach.for data that persists for the life of the application.including any other servlet instances that were instantiated with different init parameters Context attributes . which means two sets of instance variables. Struts provides its own Controller component and integrates with other technologies to provide the Model and the View. and XML. as well as Velocity Templates. For the View.for data that persists for the life of the servlet. JavaBeans. and be shared with all other servlets      100) How can I share data between two different web applications? Different servlets may share data within one application via ServletContext. but with different init parameters. XSLT. ResourceBundles. as well as various Jakarta Commons packages.for data that must persist for the life of the application. In this case. like Hibernate. Remember that you can store data in lots of different places in a servlet. there will be two instances of the same servlet class. like JDBC and EJB. iBATIS. as well as most any third-party packages. a variation of the classic ModelView-Controller (MVC) design paradigm. shared with all concurrent users -. Struts can interact with standard data access technologies. shared with all concurrent users Static variables . you may wanna consider using EJBs. To wit:  Local variables . If you have a compelling to put the servlets in different applications.The big difference between instance variables and static variables comes when you have configured your servlet engine to instantiate two instances of the same servlet class. Struts Interview Questions and FAQs . . Struts works well with JavaServer Pages.for loop iterators. and other presentation systems. result sets.1 Q: What is Struts? A: The core of the Struts framework is a flexible control layer based on standard technologies like Java Servlets. For the Model.for data that must be passed to other servlets invoked with the RequestDispatcher Session attributes . or Object Relational Bridge. but only one set of static variables.persists for all future requests from the current user only Instance variables . and so forth Request attributes . including JSTL and JSF.

Q: What is ActionForm? A: An ActionForm is a JavaBean that extends org. Server side validation of form can be accomplished by sub classing your From Bean with DynaValidatorForm class. reliable Web applications with Java. It can be use to validate the data on the users browser as well as on the server side. Struts helps you create an extensible development environment for your application. In the the Jakarta Struts Framework this class plays the role of controller. Struts Framework emits the java scripts and it can be used validate the form data on the client browser.The Struts framework provides the invisible underpinnings every professional web application needs to survive.ActionForm.ActionServlet is the called the ActionServlet. Controller is responsible for handling all the requests.struts.action. To use the Action.apache. Q: What is ActionServlet? A: The class org. The ActionServlet (commad) passes the parameterized class to Action Form using the execute() method. The purpose of Action Class is to translate the HttpServletRequest to the business logic. Now the Validator framework is a part of Jakarta Commons project . based on published standards and proven design patterns.properties files and these files contains the messages that can be used in the struts project. All the requests to the server goes through the controller. It is advisable to perform all the database related stuffs in the Action Class. Struts framework makes it much easier to design scalable. we need to Subclass and overwrite the execute() method. Example: <message-resources parameter=###BOT_TEXT###quot;MessageResources###BOT_TEXT###quot; />. The Validator framework was developed by David Winterfeldt as third-party addon to Struts. Q: How you will make available any Message Resources Definitions file to the Struts Framework Environment? A: T Message Resources Definitions file are simple . Q: What is Struts Validator Framework? A: Struts Framework provides the functionality to validate the form data.action.xml file through <message-resources /> tag.struts. Q: What is Action Class? A: The Action Class is part of the Model and is a wrapper around the business logic.apache. In the Action Class all the database/business processing are done. The return type of the execute method is ActionForward which is used by the Struts Framework to forward the request to the file as per the value of the returned ActionForward object. Q: What is Jakarta Struts Framework? A: Jakarta Struts is open source implementation of MVC (Model-ViewController) pattern for the development of web based applications. Message Resources Definitions files can be added to the struts-config. Jakarta Struts is robust architecture and can be used for the development of application of any size. ActionForm maintains the session state for web application and the ActionForm object is automatically populated on the server side with data entered from a form on the client side.

one must upload the data as normal java datatypes. The example below inserts a BLOB in the form of a byte[] and a CLOB in the form of a String into the database Inserting SQL3 type data [BLOB & CLOB] private void runInsert() { try { // Log this. or is used to retrieve the next result from a sequence of multiple results. "). The validation. to define the form specific validations.sql.prepareStatement( ..executeQuery() always close the ResultSet from the previous executeQuery()? A ResultSet is automatically closed by the Statement that generated it when that Statement is closed.xml defines the standard validation routines.BLOB. 22) How do I upload SQL3 BLOB & CLOB data to a database? Although one may simply extract BLOB & CLOB data from the database using the methods of the java. // Open a new Statement PreparedStatement stmnt = conn..log("Inserting values . The <html:javascript> when added in the jsp file generates the client site validation script. The validator-rules. For example the code: <html:javascript formName=###BOT_TEXT###quot;logonForm###BOT_TEXT###quot; dynamicJavascript=###BOT_TEXT###quot;true###BOT_TEXT###quot; staticJavascript=###BOT_TEXT###quot;true###BOT_TEXT###quot; /> generates the client side java script for the form ###BOT_TEXT###quot;logonForm###BOT_TEXT###quot; as defined in the validation. Q: How to get data from the velocity page in a action class? A: We can get the values in the action classes by using data.xml. Q: Give the Details of XML files used in Validator Framework? A: The Validator Framework uses two XML configuration files validatorrules. 21) Will a call to PreparedStatement.xml defines the validations applied to a form bean.getParameter(###BOT_TEXT###quot;variable name defined in the velocity page###BOT_TEXT###quot;).xml. these are reusable and used in validation.sql. Q: A: How you will display validation fail errors on jsp page? Following tag displays all the errors: <html:errors/> Q: How you will enable front-end validation based on the xml in validation.xml? A: The <html:javascript> tag to allow front-end validation based on the xml in validation.xml. The Validator framework comes integrated with the Struts Framework and can be used without doing any extra settings.xml and validation.CLOB and java.and it can be used with or without Struts. re-executed.xml file.

When you execute Connection.setBytes(1. 24) Are prepared statements faster because they are compiled? if so." + clobData).getTime() . "i: " + i + ". i < 500. Done!").before. all the columns bindings take place. name) values (?. 25) Is it possible to connect to multiple databases simultaneously? Can one extract/update data from multiple databases with a single statement? In general.if you re-use them. Some drivers bind the columns you request in the SQL statement.setString(2. as usual. } catch(SQLException ex) { this."insert Lobtest (image. blobData). stmnt. for(int i = 0.prepareStatement(). " + ex). this. subject.getTime())).Date().. ?)").util.. } } 23) What is the difference between client and server database cursors? What you see on the client side is the current row of the cursor which called a Result (ODBC) or ResultSet (JDBC). The cursor is a server-side entity only and remains on the server side.executeUpdate(). } // Get another timestamp to complete the time measurement Date after = new java.log("Hmm. but they are bound by the JDBC driver. // Create a timestamp to measure the insert time Date before = new java. For additional information on Prepared Statement performance and binding see JDBC Performance Tips on IBM's website. Prepared Statements can be a lot faster . so the binding overhead does not occur each time you run the Prepared Statement. Depending on the driver. where and when are they compiled? Prepared Statements aren't actually compiled.close(). log("Total run time: " + ( after. At least one driver ( and probably others ) will also . one can connect to multiple databases at the same time. // Close database resources stmnt..util.Date().log(" .. i++) { // Set parameters stmnt. to the capabilities of the specific driver implementation. // Perform insert int rowsAffected = stmnt.

handle commits across multiple connections. You need to update your driver if you wish to use the new capabilities. XOpen also has papers available regarding DRDA.I. ) where that maxim applies. when you try to perform a 2. DRDA ( Distributed Relational Database Architecture -.x drivers.0. normally using standard SQL statements. As to the second part of the question. ) is. However. A prepared statement obviously fits best when a statement differing only in variable criteria is executed over and over without closing the statement. 26) Why do I get an UnsupportedOperationException? JDBC 2. Oracle has a product called Oracle Transparent Gateway for IBM DRDA and IBM has a product called DataJoiner that make multiple databases appear as one to your application. No doubt there are other products available. an UnsupportedOperationException will be thrown. 27) What advantage is there to using prepared statements if I am using connection pooling or closing the connection frequently to avoid resource/connection/cursor limitations? The ability to choose the 'best' efficiency ( or evaluate tradeoffs.x driver.0. but for now. if you prefer. 29) Can I reuse a Statement or must I create a new one for each query? . built on the fly SQL. 28) What is JDBC. in a generic manner. This is YAA ( Yet Another Area. introduced with the 1. the SQL may be cached and reused even for a different prepared statement and most of the work is done by the DB engine rather than the driver. prepared statements deal with data conversions that can be error prone in straight ahead.0 task with a 1. In addition. for example. one needs special middleware to deal with multiple databases in a single statement or to effectively treat them as one database. make it rhyme with "Gerta" ) is probably most commonly used to accomplish this. depending on the DB engine. anyhow? JDBC is Java's means of dynamically accessing tabular data. at least. at times. Obviously one should check the driver documentation rather than assuming these capabilities. one loses most of the original benefit of prepared statements when the connection is closed.2 version of Java. and primarily data in relational databases. added several capabilities to JDBC. the most important piece of a mature developer's skillset. Instead of completely invalidating all the older JDBC 1. Apparently there is an effort to allow prepared statements to work 'better' with connection pools in JDBC 3. handling quotes and dates in a manner transparent to the developer.

since it does not extract any data from the database until you explicitly ask it to. 2. Thus. 12) I have the choice of manipulating database data using a String or a java.Blob. since it does not extract any data from the database until you explicitly ask it to.When using a JDBC compliant driver.Blob class for extraction whenever you can." Also note that a Statement SHOULD automatically close the current ResultSet before executing a new query. Conclusion: Unless you always intend to extract the full textual data stored in the particular table cell. you should use a byte[] since data has not been uploaded to the database yet. Thus.Clob. For insertion into the database.sql. That pointer is a rather large number (between 32 and 256 bits in size) but the effort to extract it from the database is insignificant next to extracting the full blob content.sql. The Java platform 2 type Blob wraps a database locator (which is essentially a pointer to byte).Clob class for extraction whenever you can. That pointer is a rather large number (between 32 and 256 bits in size) but the effort to extract it from the database is insignificant next to extracting the full Clob content.Blob.sql. Conclusion: use the java. use the Clob class only for extraction. use the Blob class only for extraction.Clob. Client Tier or user interface Middle Tier or business logic Data Storage Tier Applied to web applications and distributed programming. so be sure you are done with it before re-querying using the same Statement. Which has best performance? java. 3. For insertion into the database. However. Which has best performance? java. The Java platform 2 type Clob wraps a database locator (which is essentially a pointer to char). 30) What is a three-tier architecture? A three-tier architecture is any system which enforces a general separation between the following three parts: 1. some older drivers did not always "respect the spec.sql.sql. you can use the same Statement for any number of queries. you should use a String since data need not been downloaded from the database. the three logical tiers usually correspond to the physical separation between three types of devices or hosts: 11) I have the choice of manipulating database data using a byte[] or a java. use the java.sql. 13) Do I need to commit after an INSERT call in JDBC or does JDBC do it automatically in the DB? .

The oracle cursor can however be processed like a ResultSet would be from the client. Can be passed as a parameter to a SQL statement.Blob type.1.sql. . CLOB: Contains character large objects.Clob type. then go back and retrieve the next 100 rows and so on ? Use the Statement.what it "contains" depends partially on the driver and what the query returns. Its implementation depends on the driver and hence . REF: Serves as a reference to SQL data within the database. and is manifest by the java. Closing a connection closes all interaction with the database and releases any locks that might have been obtained in the process.Struct type.setAutoCommit method) is false. you are required to call the commit() method .sql.Ref type.sql.sql. A Type 4 driver executing a stored procedure that returns a cursor . Mapped to the java.sql.and vice versa.X and Jdk 1.Array type. BLOB: Holds binary large objects. Mapped to the java. 15) What does ResultSet actually contain? Is it the actual data of the result or some links to databases? If it is the actual data then why can't we access it after connection is closed? A ResultSet is an interface. if a SELECT typically returns a 1000 rows.setFetchSize method to indicate the size of each database fetch. 16) What are SQL3 data types? The next version of the ANSI/ISO SQL standard defines some new datatypes. ARRAY: Can store values of a specified type. For example with the Odbc bridge what the underlying implementation layer contains is an ODBC result set. Please consult the Db driver manual. no standardized way of setting the fetch size exists. commonly referred to as the SQL3 types. Mapped to the java.If your autoCommit flag (managed by the Connection. Note that this method is only available in the Java 2 platform. how do first retrieve the 100 rows. The primary SQL3 types are: STRUCT: This is the default mapping for any SQL structured type.0.X. Mapped to the java.on an oracle database it actually returns a cursor in the database. 14) How can I retrieve only the first n rows. second n rows of a database using a particular WHERE clause ? For example. For Jdk 1.

Use method setBytes(int index. 18) What is SQLJ and why would I want to use it instead of JDBC? SQL/J is a technology. Sybase) support SQLJ. they can be preceded with a special escape character in strings. that enables you to embed SQL statements in Java. The characters "%" and "_" have special meaning in SQL LIKE clauses (to match zero or more characters. byte[] data). Originating from a binary file. or exactly one character. setXXX(). Currently. In order to interpret them literally. Create a byte array from the read data. of java. the query SELECT NAME FROM IDENTIFIERS WHERE ID LIKE '\_%' {escape '

} finds identifier names that begin with an underbar. 20) How can I pool my database connections so I don't have to keep reconnecting to the database? • you gets a reference to the pool . byte[]. 3. include the following syntax on the end of the query: {escape 'escape-character'} For example. "###BOT_TEXT###quot;. The purpose of the SQLJ API is to simplify the development requirements of the JDBC API while doing the same thing. but others do not.g. the SQL string will cause an error. and updateXXX() methods defined in ResultSet interface 17) How can I manage special characters (for example: " _ ' % ) when I execute an INSERT query? If I don't filter the quoting marks or the apostrophe. SQLJ has not been accepted as a standard. so if you have to learn one of the two technologies. 2. 19) How do I insert an image file (or other raw data) into a database? All raw data types (including binary documents or images) should be read and uploaded to the database as an array of bytes. Some major databases (Oracle.You can retrieve.PreparedStatement to upload the data. Read all data from the file using a FileInputStream.sql. respectively). for example. store and update SQL3 types using the corresponding getXXX(). I recommend JDBC. originally developed by Oracle Corporation. e. 1. In order to specify the escape character used to quote these characters.

and subsequently tier 2 may communicate with tier 3 (data storage) using JDBC. Do watch out for DB specific SP definitions that can cause migration headaches. The important thing is the functionality at each tier. • Tier 1 . • Use stored procedures when they can be created in a standard manner.Presentation . • Tier 2 . etc. • Always close Statement and ResultSet objects as soon as possible.Storage/Enterprise Systems . for example. . properties files. • Write modular classes to handle database interaction specifics. • Softcode database specific parameters with. These can be beneficial.should be concerned mainly with display of user interfaces and/or data to the client browser or client system. you don't consume your time to connect / disconnect from your data source. • Even though the jdbc promotes portability. for example with DB specific escaping. functions and so on. where tier 1 is a web-server.should be concerned with business logic Tier 3+ .Application . • Use prepared statements. • Work with DatabaseMetaData to get information about database functionality. for example. In a web application. Each of these tiers may be on separate physical machines or they may share the same box.should be focused on data persistence and/or communication with other Enterprise Systems. even when used only once. 31) What separates one tier from another in the context of n-tiered architecture? It depends on the application.• • • you gets a free connection from the pool you performs your different tasks you frees the connection to the pool Since your application retrieves a pooled connection. true portability comes from NOT depending on any database specific data types. it may communicate with a tier 2 Application Server using RMI over IIOP. 32) What areas should I focus on for the best performance in a JDBC application? These are few points to consider: • Use a connection pool mechanism whenever possible. • Select only required columns rather than using select * from Tablexyz.

Date date = new Date(ts. you can use the driver directly. For example. say. 37) What's new in JDBC 3. • Test your code with debug statements to determine the time it takes to execute your query and so on to help in tuning your code.. especially for dates. store birthdate as a date type rather than.• Always catch AND handle database warnings and exceptions.util.forName(Drivername) the only way to load a driver? Can I instantiate the Driver and use the object of the driver? Yes. //. 33) How can I insert multiple rows into a database in a single transaction? //turn off the implicit commit Connection.getNanos() / 1000000 )). Also use query plan functionality if available. If you need the partial seconds. and manage relational databases. Create an instance of the driver and use the connect method from the Driver interface. due to the expected standard behavior of drivers when the class is loaded.getTime() + (ts. it stores the fractional part of the time within itself instead of within the Date superclass. 34) How do I convert a java. 36) Is Class. examine. • Use proper ( and a single standard if possible ) formats.sql.0? Probably the new features of most interest are: . you have to add them back in. Note that there may actually be two instances created.Commit(). varchar. manipulate. Be sure to check for additional pending exceptions.your insert/update/delete goes here Connection. a new transaction is implicitly started.setAutoCommit(false). 35) What is SQL? SQL is a standardized language used to create. • Use proper data types for specific kind of data.Date? While Timesteamp extends Date.Timestamp to a java.

Some drivers. Before a particular row is operated upon. 41) Can I ensure that my app has the latest data? Typically an application retrieves multiple rows of data. the JDBC database URL passed is not properly constructed.sql. would not be possible. only the current Statement appears to be executed.Date should carry only . the actual data may have been modified by another program. java.sql. 39) When I create multiple Statements on my Connection. This may be the case. You can find out the theoretical maximum number of active Connections that your driver can obtain via the DatabaseMetaData.Time? These classes are thin wrappers extending java.util. 38) Why do I get the message "No Suitable Driver"? Often the answer is given that the correct driver is not loaded. this is completely dependent on the JDBC driver. 40) Can a single thread open up mutliple connections simultaneously for the same database and for same table? The general answer to this is yes. unfortunately. however. When a Connection request is issued. 42) What does normalization mean for java.4. providing a snapshot at an instant of time. the DriverManager asks each loaded driver if it understands the URL sent.Date. CLOB. a JDBC 2. This means that additional Statements are not executed until the preceding Statement is completed.sql and javax.sql ( JDBC 2.Date and java. If that were not true. implement this requirement by processing Statements serially. for example. ARRAY and REF types • Both java. connection pools. If no driver responds that it understands the URL.refreshRow method. What's the problem? All JDBC objects are required to be threadsafe. but more typically. When it is essential that the most recent data is provided.• Savepoint support • Reuse of prepared statements by connection pools • Retrieval of auto-generated keys • Ability to have multiple open ResultSet objects • Ability to make internal updates to the data in Blob and Clob objects • Ability to Update columns containing BLOB.sql. As always.0 Optional Package ) are expected to be included with J2SE 1. then the "No Suitable Driver" message is returned.0 driver provides the ResultSet.getMaxConnections method. which has both date and time components.

Statement interface will set the 'default' value for all the ResultSet derived from that Statement. supporting object. their execution can be faster than that of Statement objects. This portion of the SQL standard is concerned with manipulating the data in a database as opposed to the structure of a database. java.Time should carry only time information and a normalized instance has the date set to the Java epoch ( January 1. Since database fetches can be expensive in a networked environment. a PreparedStatement or Batch Updates? Because PreparedStatement objects are precompiled. That's all the API says. The .ResultSet interface will override that value for a specific ResultSet. in terms of performance. to do multiple insert/update statements. The method in the java. the excess rows are "silently dropped". and CallableStatement can all execute the addBatch() method. Their execution can be faster than that of PreparedStatement object.date information and a normalized instance has the time information set to zeros. fetch size has an impact on performance. 43) What's the best way. setMaxRows(int) sets the limit of the maximum nuber of rows in a ResultSet object. Batch updates are used when you want to execute multiple statements together. 46) What is DML? DML is an abbreviation for Data Manipulation Language. While it depends on the driver/DBMS engine as to whether or not you will get an actual performance benefit from batch updates.sql. Statement. 45) What is the difference between setMaxRows(int) and SetFetchSize(int)? Can either reduce processing time? setFetchSize(int) defines the number of rows that will be read from the database when the ResultSet needs more rows. If this limit is exceeded. PreparedStatement. 1970 ) and the milliseconds portion set to zero. an SQL statement that is executed many times is often created as a PreparedStatement object to increase efficiency.sql. so the setMaxRows method may not help performance at all other than to decrease memory usage.sql. A value of 0 (default) means no limit. as well as relational stores. Consequently. there is no conflict here. the method in the java. Actually. 44) What is JDO? JDO provides for the transparent persistence of data in a data store agnostic manner. hierarchical. A CallableStatement object provides a way to call stored procedures in a standard manner for all DBMSes.

47) What is DDL? DDL is an abbreviation for Data Definition Language. If the default is not appropriate for your transaction. Most databases allow a default value for the column as well. The core verbs for DDL are CREATE. Price NUMERIC(5.getImportedKeys() returns a ResultSet with data about foreign key columns. UPDATE. 48) How can I get information about foreign keys used in a table? DatabaseMetaData. You can determine the default using DatabaseMetaData. change it with Connection. INSERT. updating and selecting rows from a database? The answer depends on both your code and the DBMS. indexes and views.getDefaultTransactionIsolation() and the level for the current Connection with Connection. it is often not supported in transactions. tables. While most DBMS engines allow DDL to be used dynamically ( and available to JDBC ). a JDBC™ application connects to a target data source using one of two mechanisms: . 49) How do I disallow NULL values in a table? Null capability is a column integrity constraint. If the program does not explicitly set the isolation level. ALTER and DROP. This portion of the SQL standard is concerned with the creation. normally aplied at table creation time. COMMIT and ROLLBACK. sequence and update and delete rules. 2) NOT NULL ) 50) What isolation level is used by the DBMS when inserting. The following SQL statement displays the NOT NULL constraint: CREATE TABLE CoffeeTable ( Type VARCHAR(25) NOT NULL. the DBMS default is used. you need to establish a connection with the DBMS you want to use. deletion and modification of database objects like tables.core verbs for DML are SELECT. Establishing a Connection First.setTransactionIsolation(int level). DELETE. Note that some databases won't allow the constraint to be applied after table creation. Typically.getTransactionIsolation(). Pounds INTEGER NOT NULL.

Using the DriverManager Class The DriverManager class works with the Driver interface to manage the set of drivers available to a JDBC client.EmbeddedDriver"). Establishing a connection involves two steps: Loading the driver. but it would do no harm. EmbeddedDriver is one of the drivers for Java DB. It involves just one line of code in your program. Your driver documentation provides the class name to use. on the classpath.apache. or in an absolute location on your file system.forName automatically creates an instance of a driver and registers it with the DriverManager. After you have loaded a driver.jdbc. As part of its initialization. If you were to create your own instance. Calling the Class. the DriverManager class attempts to load the driver classes referenced in the jdbc. Loading the Driver Loading the driver you want to use is very simple. In the example above. When the client requests a connection and provides a URL. using a hardcoded URL. Making the Connection The second step in establishing a connection is to have the appropriate driver connect to the DBMS. in a JAR file. . DataSource: This interface is preferred over DriverManager because it allows details about the underlying data source to be transparent to your application. Connection URLs have the following form: jdbc:derby:<dbName>[propertyList] The dbName portion of the URL identifies a specific database.drivers system property. This allows you to customize the JDBC Drivers used by your applications. A DataSource object's properties are set so that it represents a particular data source. you would be creating an unnecessary duplicate. so you don't need to create an instance of the class. the DriverManager is responsible for finding a driver that recognizes the URL and for using it to connect to the corresponding data source. To use the Java DB driver. and making the connection.derby. A database can be in one of many locations: in the current working directory.• DriverManager: • This fully implemented class requires an application to load a specific driver.forName("org. in a specific Java DB database home directory. add the following line of code: Class. it can make a connection with a DBMS.

apache.lookup("java:comp/env/jdbc/myDB"). the documentation will tell you what subprotocol to use. such as Oracle.setPort(1527). " just these two lines of code will establish a connection: String url = "jdbc:derby:Fred". Unless you are writing a driver. what to put after jdbc: in the JDBC URL.OracleDriver . if you log in to your DBMS with a login name of " Fernanda " and a password of " J8. Connection con = DriverManager.getConnection The connection returned by the method DriverManager. DataSource ds = (DataSource) org.setHost("localhost"). The getConnection method establishes a connection: Connection conn = DriverManager. In the previous example. that driver establishes a connection to the DBMS specified in the JDBC URL. In place of " myLogin " you insert the name you use to log in to the DBMS.getConnection is an open connection you can use to create JDBC statements that pass your SQL statements to the DBMS. that is. So. "J8"). For example.ClientDataSource() ds.driver. This last part of the JDBC URL supplies information for identifying the data source. ds. The DriverManager class.If you are using a vendor-specific driver. The following example shows how to use a DataSource to establish a connection: You can configure a DataSource using a tool or manually.getConnection(url. .getConnection. Using a DataSource Object for a connection Using a DataSource object increases application portability by making it possible for an application to use a logical name for a data source instead of having to supply information specific to a particular driver.setUser("APP") ds. in place of " myPassword " you insert your password for the DBMS. you probably won't use any of the methods in the interface Driver. Here is an example of a DataSource lookup: InitialContext ic = new InitialContext() DataSource ds = ic. The driver documentation will also give you guidelines for the rest of the JDBC URL. manages all of the details of establishing the connection for you behind the scenes. "Fernanda". ds. For example.getConnection().jdbc.setPassword("APP"). and the only DriverManager method you really need to know is DriverManager. the first and second parts of the JDBC URL will be jdbc.derby. if the driver developer has registered the name OracleDriver as the subprotocol. If one of the drivers you loaded recognizes the JDBC URL supplied to the method DriverManager.getConnection("jdbc:derby:COFFEES"). Connection con = ds. con is an open connection. and you use it in the examples that follow. true to its name.

or when no other alternative is available. The JDBC-ODBC Bridge driver provided with JDBC is recommended only for development and testing. String name = vds.setServerName("my_database_server"). . you should obtain a commercial JDBC driver from a vendor such as your database vendor or your database middleware vendor. DataSource VendorDataSource vds = new VendorDataSource(). These properties typically are initialized when the DataSource object is deployed.Connection con = ds. implementations must provide getter and setter methods for each property they support. JDBC-ODBC Bridge Driver For normal use.getServerName(). vds.getConnection().

Related Interests

} finds identifier names that begin with an underbar. 20) How can I pool my database connections so I don't have to keep reconnecting to the database? • you gets a reference to the pool . byte[]. 3. include the following syntax on the end of the query: {escape 'escape-character'} For example. "###BOT_TEXT###quot;. The purpose of the SQLJ API is to simplify the development requirements of the JDBC API while doing the same thing. but others do not.g. the SQL string will cause an error. and updateXXX() methods defined in ResultSet interface 17) How can I manage special characters (for example: " _ ' % ) when I execute an INSERT query? If I don't filter the quoting marks or the apostrophe. SQLJ has not been accepted as a standard. so if you have to learn one of the two technologies. 2. 19) How do I insert an image file (or other raw data) into a database? All raw data types (including binary documents or images) should be read and uploaded to the database as an array of bytes. Some major databases (Oracle.You can retrieve.PreparedStatement to upload the data. Read all data from the file using a FileInputStream.sql. respectively). for example. store and update SQL3 types using the corresponding getXXX(). I recommend JDBC. originally developed by Oracle Corporation. e. 1. In order to specify the escape character used to quote these characters.

and subsequently tier 2 may communicate with tier 3 (data storage) using JDBC. Do watch out for DB specific SP definitions that can cause migration headaches. The important thing is the functionality at each tier. • Tier 1 . • Use stored procedures when they can be created in a standard manner.Presentation . • Tier 2 . etc. • Always close Statement and ResultSet objects as soon as possible.Storage/Enterprise Systems . for example. . properties files. • Write modular classes to handle database interaction specifics. • Softcode database specific parameters with. These can be beneficial.should be concerned mainly with display of user interfaces and/or data to the client browser or client system. you don't consume your time to connect / disconnect from your data source. • Even though the jdbc promotes portability. for example with DB specific escaping. functions and so on. where tier 1 is a web-server.should be concerned with business logic Tier 3+ .Application . • Use prepared statements. • Work with DatabaseMetaData to get information about database functionality. for example. In a web application. Each of these tiers may be on separate physical machines or they may share the same box.should be focused on data persistence and/or communication with other Enterprise Systems. even when used only once. 31) What separates one tier from another in the context of n-tiered architecture? It depends on the application.• • • you gets a free connection from the pool you performs your different tasks you frees the connection to the pool Since your application retrieves a pooled connection. true portability comes from NOT depending on any database specific data types. it may communicate with a tier 2 Application Server using RMI over IIOP. 32) What areas should I focus on for the best performance in a JDBC application? These are few points to consider: • Use a connection pool mechanism whenever possible. • Select only required columns rather than using select * from Tablexyz.

Date date = new Date(ts. you can use the driver directly. For example. say. 37) What's new in JDBC 3. • Test your code with debug statements to determine the time it takes to execute your query and so on to help in tuning your code.. especially for dates. store birthdate as a date type rather than.• Always catch AND handle database warnings and exceptions.util.forName(Drivername) the only way to load a driver? Can I instantiate the Driver and use the object of the driver? Yes. //. 33) How can I insert multiple rows into a database in a single transaction? //turn off the implicit commit Connection.getNanos() / 1000000 )). Also use query plan functionality if available. If you need the partial seconds. and manage relational databases. Create an instance of the driver and use the connect method from the Driver interface. due to the expected standard behavior of drivers when the class is loaded.getTime() + (ts. it stores the fractional part of the time within itself instead of within the Date superclass. 34) How do I convert a java. 36) Is Class. examine. • Use proper ( and a single standard if possible ) formats.sql.0? Probably the new features of most interest are: . you have to add them back in. Note that there may actually be two instances created.Commit(). varchar. manipulate. Be sure to check for additional pending exceptions.your insert/update/delete goes here Connection. a new transaction is implicitly started.setAutoCommit(false). 35) What is SQL? SQL is a standardized language used to create. • Use proper data types for specific kind of data.Date? While Timesteamp extends Date.Timestamp to a java.

Some drivers. Before a particular row is operated upon. 41) Can I ensure that my app has the latest data? Typically an application retrieves multiple rows of data. the JDBC database URL passed is not properly constructed.sql. would not be possible. only the current Statement appears to be executed.Date should carry only . the actual data may have been modified by another program. java.sql. 39) When I create multiple Statements on my Connection. This may be the case. You can find out the theoretical maximum number of active Connections that your driver can obtain via the DatabaseMetaData.Time? These classes are thin wrappers extending java.util. 38) Why do I get the message "No Suitable Driver"? Often the answer is given that the correct driver is not loaded. this is completely dependent on the JDBC driver. 40) Can a single thread open up mutliple connections simultaneously for the same database and for same table? The general answer to this is yes. unfortunately. however. When a Connection request is issued. 42) What does normalization mean for java.4. providing a snapshot at an instant of time. the DriverManager asks each loaded driver if it understands the URL sent.Date. CLOB. a JDBC 2. This means that additional Statements are not executed until the preceding Statement is completed.sql and javax.sql ( JDBC 2.Date and java. If that were not true. implement this requirement by processing Statements serially. for example. ARRAY and REF types • Both java. connection pools. If no driver responds that it understands the URL.refreshRow method. What's the problem? All JDBC objects are required to be threadsafe. but more typically. When it is essential that the most recent data is provided.• Savepoint support • Reuse of prepared statements by connection pools • Retrieval of auto-generated keys • Ability to have multiple open ResultSet objects • Ability to make internal updates to the data in Blob and Clob objects • Ability to Update columns containing BLOB.sql. As always.0 Optional Package ) are expected to be included with J2SE 1. then the "No Suitable Driver" message is returned.0 driver provides the ResultSet.getMaxConnections method. which has both date and time components.

Statement interface will set the 'default' value for all the ResultSet derived from that Statement. supporting object. their execution can be faster than that of Statement objects. This portion of the SQL standard is concerned with manipulating the data in a database as opposed to the structure of a database. java.Time should carry only time information and a normalized instance has the date set to the Java epoch ( January 1. Since database fetches can be expensive in a networked environment. a PreparedStatement or Batch Updates? Because PreparedStatement objects are precompiled. That's all the API says. The .ResultSet interface will override that value for a specific ResultSet. in terms of performance. to do multiple insert/update statements. The method in the java. the excess rows are "silently dropped". and CallableStatement can all execute the addBatch() method. Their execution can be faster than that of PreparedStatement object.date information and a normalized instance has the time information set to zeros. fetch size has an impact on performance. 43) What's the best way. setMaxRows(int) sets the limit of the maximum nuber of rows in a ResultSet object. Batch updates are used when you want to execute multiple statements together. 46) What is DML? DML is an abbreviation for Data Manipulation Language. While it depends on the driver/DBMS engine as to whether or not you will get an actual performance benefit from batch updates.sql. Statement. 45) What is the difference between setMaxRows(int) and SetFetchSize(int)? Can either reduce processing time? setFetchSize(int) defines the number of rows that will be read from the database when the ResultSet needs more rows. If this limit is exceeded. PreparedStatement. 1970 ) and the milliseconds portion set to zero. an SQL statement that is executed many times is often created as a PreparedStatement object to increase efficiency.sql. so the setMaxRows method may not help performance at all other than to decrease memory usage.sql. A value of 0 (default) means no limit. as well as relational stores. Consequently. there is no conflict here. the method in the java. Actually. 44) What is JDO? JDO provides for the transparent persistence of data in a data store agnostic manner. hierarchical. A CallableStatement object provides a way to call stored procedures in a standard manner for all DBMSes.

47) What is DDL? DDL is an abbreviation for Data Definition Language. If the default is not appropriate for your transaction. Most databases allow a default value for the column as well. The core verbs for DDL are CREATE. Price NUMERIC(5.getImportedKeys() returns a ResultSet with data about foreign key columns. UPDATE. 48) How can I get information about foreign keys used in a table? DatabaseMetaData. You can determine the default using DatabaseMetaData. change it with Connection. INSERT. updating and selecting rows from a database? The answer depends on both your code and the DBMS. indexes and views.getDefaultTransactionIsolation() and the level for the current Connection with Connection. it is often not supported in transactions. tables. While most DBMS engines allow DDL to be used dynamically ( and available to JDBC ). a JDBC™ application connects to a target data source using one of two mechanisms: . 49) How do I disallow NULL values in a table? Null capability is a column integrity constraint. If the program does not explicitly set the isolation level. ALTER and DROP. This portion of the SQL standard is concerned with the creation. normally aplied at table creation time. COMMIT and ROLLBACK. sequence and update and delete rules. 2) NOT NULL ) 50) What isolation level is used by the DBMS when inserting. The following SQL statement displays the NOT NULL constraint: CREATE TABLE CoffeeTable ( Type VARCHAR(25) NOT NULL. the DBMS default is used. you need to establish a connection with the DBMS you want to use. deletion and modification of database objects like tables.core verbs for DML are SELECT. Establishing a Connection First.setTransactionIsolation(int level). DELETE. Note that some databases won't allow the constraint to be applied after table creation. Typically.getTransactionIsolation(). Pounds INTEGER NOT NULL.

Using the DriverManager Class The DriverManager class works with the Driver interface to manage the set of drivers available to a JDBC client.EmbeddedDriver"). Establishing a connection involves two steps: Loading the driver. but it would do no harm. EmbeddedDriver is one of the drivers for Java DB. It involves just one line of code in your program. Your driver documentation provides the class name to use. on the classpath.apache. or in an absolute location on your file system.forName automatically creates an instance of a driver and registers it with the DriverManager. After you have loaded a driver.jdbc. As part of its initialization. If you were to create your own instance. Calling the Class. the DriverManager class attempts to load the driver classes referenced in the jdbc. Loading the Driver Loading the driver you want to use is very simple. In the example above. When the client requests a connection and provides a URL. using a hardcoded URL. Making the Connection The second step in establishing a connection is to have the appropriate driver connect to the DBMS. in a JAR file. . DataSource: This interface is preferred over DriverManager because it allows details about the underlying data source to be transparent to your application. Connection URLs have the following form: jdbc:derby:<dbName>[propertyList] The dbName portion of the URL identifies a specific database.drivers system property. This allows you to customize the JDBC Drivers used by your applications. A DataSource object's properties are set so that it represents a particular data source. you would be creating an unnecessary duplicate. so you don't need to create an instance of the class. the DriverManager is responsible for finding a driver that recognizes the URL and for using it to connect to the corresponding data source. To use the Java DB driver. and making the connection.derby. A database can be in one of many locations: in the current working directory.• DriverManager: • This fully implemented class requires an application to load a specific driver.forName("org. in a specific Java DB database home directory. add the following line of code: Class. it can make a connection with a DBMS.

apache.lookup("java:comp/env/jdbc/myDB"). the documentation will tell you what subprotocol to use. such as Oracle.setPort(1527). " just these two lines of code will establish a connection: String url = "jdbc:derby:Fred". Unless you are writing a driver. what to put after jdbc: in the JDBC URL.OracleDriver . if you log in to your DBMS with a login name of " Fernanda " and a password of " J8. Connection con = DriverManager.getConnection The connection returned by the method DriverManager. DataSource ds = (DataSource) org.setHost("localhost"). The getConnection method establishes a connection: Connection conn = DriverManager. In the previous example. that driver establishes a connection to the DBMS specified in the JDBC URL. In place of " myLogin " you insert the name you use to log in to the DBMS.getConnection is an open connection you can use to create JDBC statements that pass your SQL statements to the DBMS. that is. So. "J8"). For example.ClientDataSource() ds.driver. This last part of the JDBC URL supplies information for identifying the data source. ds. The DriverManager class.If you are using a vendor-specific driver. The following example shows how to use a DataSource to establish a connection: You can configure a DataSource using a tool or manually.getConnection(url. .getConnection. Using a DataSource Object for a connection Using a DataSource object increases application portability by making it possible for an application to use a logical name for a data source instead of having to supply information specific to a particular driver.setUser("APP") ds. in place of " myPassword " you insert your password for the DBMS. you probably won't use any of the methods in the interface Driver. Here is an example of a DataSource lookup: InitialContext ic = new InitialContext() DataSource ds = ic. The driver documentation will also give you guidelines for the rest of the JDBC URL. manages all of the details of establishing the connection for you behind the scenes. "Fernanda". ds. For example.getConnection().jdbc.setPassword("APP"). and the only DriverManager method you really need to know is DriverManager. the first and second parts of the JDBC URL will be jdbc.derby. if the driver developer has registered the name OracleDriver as the subprotocol. If one of the drivers you loaded recognizes the JDBC URL supplied to the method DriverManager.getConnection("jdbc:derby:COFFEES"). Connection con = ds. con is an open connection. and you use it in the examples that follow. true to its name.

or when no other alternative is available. The JDBC-ODBC Bridge driver provided with JDBC is recommended only for development and testing. String name = vds.setServerName("my_database_server"). . you should obtain a commercial JDBC driver from a vendor such as your database vendor or your database middleware vendor. DataSource VendorDataSource vds = new VendorDataSource(). These properties typically are initialized when the DataSource object is deployed.Connection con = ds. implementations must provide getter and setter methods for each property they support. JDBC-ODBC Bridge Driver For normal use.getServerName(). vds.getConnection().

","doc_promotions_enabled":false,"static_promo_banner_cta_url":""},"eligible_for_exclusive_trial_roadblock":false,"eligible_for_seo_roadblock":false,"exclusive_free_trial_roadblock_props_path":"/doc-page/exclusive-free-trial-props/50441610","flashes":[],"footer_props":{"urls":{"about":"/about","press":"/press","blog":"http://literally.scribd.com/","careers":"/careers","contact":"/contact","plans_landing":"/subscribe","referrals":"/referrals?source=footer","giftcards":"/giftcards","faq":"/faq","accessibility":"/accessibility-policy","faq_paths":{"accounts":"https://support.scribd.com/hc/sections/202246346","announcements":"https://support.scribd.com/hc/sections/202246066","copyright":"https://support.scribd.com/hc/sections/202246086","downloading":"https://support.scribd.com/hc/articles/210135046","publishing":"https://support.scribd.com/hc/sections/202246366","reading":"https://support.scribd.com/hc/sections/202246406","selling":"https://support.scribd.com/hc/sections/202246326","store":"https://support.scribd.com/hc/sections/202246306","status":"https://support.scribd.com/hc/en-us/articles/360001202872","terms":"https://support.scribd.com/hc/sections/202246126","writing":"https://support.scribd.com/hc/sections/202246366","adchoices":"https://support.scribd.com/hc/articles/210129366","paid_features":"https://support.scribd.com/hc/sections/202246306","failed_uploads":"https://support.scribd.com/hc/en-us/articles/210134586-Troubleshooting-uploads-and-conversions","copyright_infringement":"https://support.scribd.com/hc/en-us/articles/210128946-DMCA-copyright-infringement-takedown-notification-policy","end_user_license":"https://support.scribd.com/hc/en-us/articles/210129486","terms_of_use":"https://support.scribd.com/hc/en-us/articles/210129326-General-Terms-of-Use"},"publishers":"/publishers","static_terms":"/terms","static_privacy":"/privacy","copyright":"/copyright","ios_app":"https://itunes.apple.com/us/app/scribd-worlds-largest-online/id542557212?mt=8&uo=4&at=11lGEE","android_app":"https://play.google.com/store/apps/details?id=com.scribd.app.reader0&hl=en","books":"/books","sitemap":"/directory"}},"global_nav_props":{"header_props":{"logo_src":"/images/landing/home2_landing/scribd_logo_horiz_small.svg","root_url":"https://www.scribd.com/","search_term":"","small_logo_src":"/images/logos/scribd_s_logo.png","uploads_url":"/upload-document","search_props":{"redirect_to_app":true,"search_url":"/search","query":"","search_page":false}},"user_menu_props":null,"sidebar_props":{"urls":{"bestsellers":"https://www.scribd.com/bestsellers","home":"https://www.scribd.com/","saved":"/saved","subscribe":"/archive/pmp_checkout?doc=50441610&metadata=%7B%22context%22%3A%22pmp%22%2C%22action%22%3A%22start_trial%22%2C%22logged_in%22%3Afalse%2C%22platform%22%3A%22web%22%7D","top_charts":"/bestsellers","upload":"https://www.scribd.com/upload-document"},"categories":{"book":{"icon":"icon-ic_book","icon_filled":"icon-ic_book_fill","url":"https://www.scribd.com/books","name":"Books","type":"book"},"news":{"icon":"icon-ic_articles","icon_filled":"icon-ic_articles_fill","url":"https://www.scribd.com/news","name":"News","type":"news"},"audiobook":{"icon":"icon-ic_audiobook","icon_filled":"icon-ic_audiobook_fill","url":"https://www.scribd.com/audiobooks","name":"Audiobooks","type":"audiobook"},"magazine":{"icon":"icon-ic_magazine","icon_filled":"icon-ic_magazine_fill","url":"https://www.scribd.com/magazines","name":"Magazines","type":"magazine"},"document":{"icon":"icon-ic_document","icon_filled":"icon-ic_document_fill","url":"https://www.scribd.com/docs","name":"Documents","type":"document"},"sheet_music":{"icon":"icon-ic_songbook","icon_filled":"icon-ic_songbook_fill","url":"https://www.scribd.com/sheetmusic","name":"Sheet Music","type":"sheet_music"}},"categories_array":["mixed","book","audiobook","magazine","news","document","sheet_music"],"selected_content_type":"mixed","username":"","search_overlay_props":{"search_input_props":{"focused":false,"keep_suggestions_on_blur":false}}}},"recommenders":{"related_titles_recommender":{"ids":[315772597,93412452,250095204,51877964,142452370,6948955,293991407,63354581,79173373,15841414,66366731,387306131,14646395,316983783,37751240,224519118,177185563,143638732,359772296,328225948,102662974,60831720,37767053,261362178,371437497,267320324,245201100,61512915,46182440,61041239,244157917,212863738,253264900,263504218,282766939,239488191,163646054,224419023,224369806,224355300,238704340,225916486,224258670,293461549,224410295,182553141,211302755,202691564,239588474,224426877,224326250,224349281,234028503,224306619,337536061,249309502,254039238,182565115,273582508,273440534,182546874,249308781,224270540,163580087,235411767,224252178,224285255,235583696,250006950,224248577,231689346,246897514,163579056,182560283,224248520,163564256,249308236,182522032,216442529,224266633,163647832,163603389,249309690],"title_link":null,"title":null,"track_opts":{"compilation_id":"If+/a0z/DlDzTbpTSXxyVvIVnlc=","module_id":"ZWNgTSXJhqES+g6uo7rHCI1Dt0s=","widget_name":"right sidebar","track_id":"flattened_recommender"}},"footer_recommenders":{"recommenders":[{"ids":[315772597,93412452,250095204,51877964,142452370,6948955,293991407,63354581,79173373,15841414,66366731,387306131,14646395,316983783,37751240,224519118,177185563,143638732,359772296,328225948,102662974,60831720,37767053,261362178,371437497,267320324,245201100,61512915,46182440,61041239],"title_link":null,"title":"Documents Similar To javaQuestions","track_opts":{"compilation_id":"If+/a0z/DlDzTbpTSXxyVvIVnlc=","module_id":"AJycMlYhHEopzuVFod+g1rZ3xsU=","widget_name":"document_carousel"}}]},"seo_new_docs_recommenders":{"recommenders":[]},"documents":{"6948955":{"type":"document","id":6948955,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/6948955/108x144/50068f5ba6/1418585579?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/6948955/216x288/8a8b394de2/1418585579?v=1","title":"JJGuidelinesBook","short_title":"JJGuidelinesBook","author":"api-3745771","tracking":{"object_type":"document","object_id":6948955,"track":"flattened_recommender","doc_uuid":"az4c9d4AYaH9bZGiEOXPXOAVHdA="},"url":"https://www.scribd.com/document/6948955/JJGuidelinesBook"},"14646395":{"type":"document","id":14646395,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/14646395/108x144/78bb203df7/1406230232?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/14646395/216x288/98b7af9719/1406230232?v=1","title":"MC.press.developing.J2EE.applications.with.WebSphere.studio.chm","short_title":"MC.press.developing.J2EE.applications.with.WebSphere.studio.chm","author":"computer_ebook","tracking":{"object_type":"document","object_id":14646395,"track":"flattened_recommender","doc_uuid":"hCzPiY2fVRJlLZfZT8EbjFwX6yU="},"url":"https://www.scribd.com/document/14646395/MC-press-developing-J2EE-applications-with-WebSphere-studio-chm"},"15841414":{"type":"document","id":15841414,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/15841414/108x144/25451a575a/1399793814?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/15841414/216x288/b19a9e9d80/1399793814?v=1","title":"r5312206-oops through java","short_title":"r5312206-oops through java","author":"sivabharathamurthy","tracking":{"object_type":"document","object_id":15841414,"track":"flattened_recommender","doc_uuid":"PPzQbWQrYacat92krCgf22DqIYk="},"url":"https://www.scribd.com/document/15841414/r5312206-oops-through-java"},"37751240":{"type":"document","id":37751240,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/37751240/108x144/0df57a9605/1284936668?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/37751240/216x288/f09fe29b9e/1284936668?v=1","title":"System Analysis Ass 2","short_title":"System Analysis Ass 2","author":"mehta_123","tracking":{"object_type":"document","object_id":37751240,"track":"flattened_recommender","doc_uuid":"BBDnR4SwGBLs+67MrWJbwnIi2gM="},"url":"https://www.scribd.com/document/37751240/System-Analysis-Ass-2"},"37767053":{"type":"document","id":37767053,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/37767053/108x144/d4e9eb012c/1399869152?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/37767053/216x288/b3d3c304fe/1399869152?v=1","title":"Analysis","short_title":"Analysis","author":"Fidelia Baadom","tracking":{"object_type":"document","object_id":37767053,"track":"flattened_recommender","doc_uuid":"fjGPU/FPct8chPFAtM+FR0xxisY="},"url":"https://www.scribd.com/document/37767053/Analysis"},"46182440":{"type":"document","id":46182440,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/46182440/108x144/b7fb12edcd/1405482261?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/46182440/216x288/49f06dcb26/1405482261?v=1","title":"java iq","short_title":"java iq","author":"Subhash_jegi","tracking":{"object_type":"document","object_id":46182440,"track":"flattened_recommender","doc_uuid":"aZoJyL5oOJQbuEXdm/+49WUehxg="},"url":"https://www.scribd.com/document/46182440/java-iq"},"51877964":{"type":"document","id":51877964,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/51877964/108x144/0d64353421/1301471065?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/51877964/216x288/d963d9e93f/1301471065?v=1","title":"000-256NEW","short_title":"000-256NEW","author":"Shraddha Sindgikar","tracking":{"object_type":"document","object_id":51877964,"track":"flattened_recommender","doc_uuid":"G5cdRyMHETKDP+9DCTQUd8a8Tek="},"url":"https://www.scribd.com/document/51877964/000-256NEW"},"60831720":{"type":"document","id":60831720,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/60831720/108x144/2fe14633d0/1311572387?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/60831720/216x288/63060fd15b/1311572387?v=1","title":"Scjp Syllabus","short_title":"Scjp Syllabus","author":"venky.sunil","tracking":{"object_type":"document","object_id":60831720,"track":"flattened_recommender","doc_uuid":"wDGGiavh8JGgFHALbYWBQuwJ/dQ="},"url":"https://www.scribd.com/document/60831720/Scjp-Syllabus"},"61041239":{"type":"document","id":61041239,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/61041239/108x144/94cb87a53b/1354112057?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/61041239/216x288/31c1c11af0/1354112057?v=1","title":"Introduction to Object Oriented Programming Part II","short_title":"Introduction to Object Oriented Programming Part II","author":"ErwinMacaraig","tracking":{"object_type":"document","object_id":61041239,"track":"flattened_recommender","doc_uuid":"1yS8y5bB60imwQhoiuY6nYg870Y="},"url":"https://www.scribd.com/document/61041239/Introduction-to-Object-Oriented-Programming-Part-II"},"61512915":{"type":"document","id":61512915,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/61512915/108x144/610616209b/1312359130?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/61512915/216x288/89c4cf6e17/1312359130?v=1","title":"BCSCCS706 R01","short_title":"BCSCCS706 R01","author":"h9840","tracking":{"object_type":"document","object_id":61512915,"track":"flattened_recommender","doc_uuid":"oNtb0nGpSFbCQhfxMmRj7Djx+N4="},"url":"https://www.scribd.com/document/61512915/BCSCCS706-R01"},"63354581":{"type":"document","id":63354581,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/63354581/108x144/9979b50948/1330265686?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/63354581/216x288/9ccf26e440/1330265686?v=1","title":"J2EE Design Patterns","short_title":"J2EE Design Patterns","author":"Uday Kumar ","tracking":{"object_type":"document","object_id":63354581,"track":"flattened_recommender","doc_uuid":"4W8kD9yyPckWaZeuO82Bc3Iqa6Y="},"url":"https://www.scribd.com/presentation/63354581/J2EE-Design-Patterns"},"66366731":{"type":"document","id":66366731,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/66366731/108x144/0aa3a9bc70/1442606383?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/66366731/216x288/01112f61dc/1442606383?v=1","title":"Strategy","short_title":"Strategy","author":"Dastagiri Saheb","tracking":{"object_type":"document","object_id":66366731,"track":"flattened_recommender","doc_uuid":"lSza83CI0MZyr/aq5tLPchuSU2s="},"url":"https://www.scribd.com/document/66366731/Strategy"},"79173373":{"type":"document","id":79173373,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/79173373/108x144/b374ee341a/1395978906?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/79173373/216x288/371842101c/1395978906?v=1","title":"Report 25","short_title":"Report 25","author":"chavareashwini","tracking":{"object_type":"document","object_id":79173373,"track":"flattened_recommender","doc_uuid":"rn/7gFWF41sCRLNonBuJ0Fp0xPw="},"url":"https://www.scribd.com/document/79173373/Report-25"},"93412452":{"type":"document","id":93412452,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/93412452/108x144/8019c915c9/1336931852?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/93412452/216x288/ea490f7e6b/1336931852?v=1","title":"Object-Oriented Programming (C# and Visual Basic)","short_title":"Object-Oriented Programming (C# and Visual Basic)","author":"Kyle Daly","tracking":{"object_type":"document","object_id":93412452,"track":"flattened_recommender","doc_uuid":"UNNMeFnGKlDAkj/a4HxYbyJP9zc="},"url":"https://www.scribd.com/document/93412452/Object-Oriented-Programming-C-and-Visual-Basic"},"102662974":{"type":"document","id":102662974,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/102662974/108x144/bfc1fc2d01/1344753136?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/102662974/216x288/e45a3c5e07/1344753136?v=1","title":"Obj Or","short_title":"Obj Or","author":"Hiramani Singh","tracking":{"object_type":"document","object_id":102662974,"track":"flattened_recommender","doc_uuid":"bfxzNAbNtnSk++1D83s9OWpwkoQ="},"url":"https://www.scribd.com/document/102662974/Obj-Or"},"142452370":{"type":"document","id":142452370,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/142452370/108x144/cc879e4886/1369012940?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/142452370/216x288/ab3b844ec7/1369012940?v=1","title":"EJB Fundamentals q","short_title":"EJB Fundamentals q","author":"Venkatesh Kumar","tracking":{"object_type":"document","object_id":142452370,"track":"flattened_recommender","doc_uuid":"gEnEfDtEcGotIlU9n5UNhRS3WMY="},"url":"https://www.scribd.com/presentation/142452370/EJB-Fundamentals-q"},"143638732":{"type":"document","id":143638732,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/143638732/108x144/97e5e9616b/1443753920?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/143638732/216x288/4ce50f9dcb/1443753920?v=1","title":"javaAWT","short_title":"javaAWT","author":"Diana Panchana","tracking":{"object_type":"document","object_id":143638732,"track":"flattened_recommender","doc_uuid":"nXRpj1qW1aTTwysdzrvUK1yGYJ4="},"url":"https://www.scribd.com/document/143638732/javaAWT"},"163564256":{"type":"book","id":163564256,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/163564256/108x144/19b813ddea/1537782067?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163564256/216x288/50918b57c9/1537782067?v=1","title":"Beautiful Ruins: A Novel","short_title":"Beautiful Ruins","author":"Jess Walter","tracking":{"object_type":"document","object_id":163564256,"track":"flattened_recommender","doc_uuid":"O6dNtKyiy4Xuzzww3481KPds0iM="},"url":"https://www.scribd.com/book/163564256/Beautiful-Ruins-A-Novel"},"163579056":{"type":"book","id":163579056,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/163579056/108x144/b0cc4a522d/1537785274?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163579056/216x288/cc1bed9752/1537785274?v=1","title":"The Art of Racing in the Rain: A Novel","short_title":"The Art of Racing in the Rain","author":"Garth Stein","tracking":{"object_type":"document","object_id":163579056,"track":"flattened_recommender","doc_uuid":"1yfhEau9VBhQNd8mkGcbCHr/Wjw="},"url":"https://www.scribd.com/book/163579056/The-Art-of-Racing-in-the-Rain-A-Novel"},"163580087":{"type":"book","id":163580087,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163580087/108x144/865888b820/1537786991?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/163580087/216x288/a50ec4d378/1537786991?v=1","title":"Bel Canto","short_title":"Bel Canto","author":"Ann Patchett","tracking":{"object_type":"document","object_id":163580087,"track":"flattened_recommender","doc_uuid":"xw0f5XgXDTAtXysv6CvBlflvDMo="},"url":"https://www.scribd.com/book/163580087/Bel-Canto"},"163603389":{"type":"book","id":163603389,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163603389/108x144/9281c90791/1537790825?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/163603389/216x288/a0de7e7dea/1537790825?v=1","title":"A Prayer for Owen Meany: A Novel","short_title":"A Prayer for Owen Meany","author":"John Irving","tracking":{"object_type":"document","object_id":163603389,"track":"flattened_recommender","doc_uuid":"O7LAxYjgc5+hx0fU9hBMV5LaWIA="},"url":"https://www.scribd.com/book/163603389/A-Prayer-for-Owen-Meany-A-Novel"},"163646054":{"type":"book","id":163646054,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163646054/108x144/c8eb9eae18/1537782033?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163646054/216x288/d6d700f05f/1537782033?v=1","title":"Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America","short_title":"Devil in the Grove","author":"Gilbert King","tracking":{"object_type":"document","object_id":163646054,"track":"flattened_recommender","doc_uuid":"u76nJrQmuvTrL0OzIbvagpa+7pQ="},"url":"https://www.scribd.com/book/163646054/Devil-in-the-Grove-Thurgood-Marshall-the-Groveland-Boys-and-the-Dawn-of-a-New-America"},"163647832":{"type":"book","id":163647832,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/163647832/108x144/9f4ce0c73a/1537784720?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/163647832/216x288/c8974e0a45/1537784720?v=1","title":"The Cider House Rules","short_title":"The Cider House Rules","author":"John Irving","tracking":{"object_type":"document","object_id":163647832,"track":"flattened_recommender","doc_uuid":"KCopJEsd1C42A+B1FCaWdNcYrVk="},"url":"https://www.scribd.com/book/163647832/The-Cider-House-Rules"},"177185563":{"type":"document","id":177185563,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/177185563/108x144/0dbde4be1f/1382116252?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/177185563/216x288/73e9715576/1382116252?v=1","title":"Java and J2EE Syllabus","short_title":"Java and J2EE Syllabus","author":"Sheeba Dhuruvaraj","tracking":{"object_type":"document","object_id":177185563,"track":"flattened_recommender","doc_uuid":"IDtTp5XFRj8x2ATN3fA1px3QB5E="},"url":"https://www.scribd.com/document/177185563/Java-and-J2EE-Syllabus"},"182522032":{"type":"book","id":182522032,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182522032/108x144/671b9a055b/1537779594?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/182522032/216x288/ec6eb5c88b/1537779594?v=1","title":"The Bonfire of the Vanities: A Novel","short_title":"The Bonfire of the Vanities","author":"Tom Wolfe","tracking":{"object_type":"document","object_id":182522032,"track":"flattened_recommender","doc_uuid":"aLlwjL2fLQ3Bt7LIxb9KHJrYAKc="},"url":"https://www.scribd.com/book/182522032/The-Bonfire-of-the-Vanities-A-Novel"},"182546874":{"type":"book","id":182546874,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182546874/108x144/817bab2149/1537786992?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182546874/216x288/a6b6573207/1537786992?v=1","title":"The Love Affairs of Nathaniel P.: A Novel","short_title":"The Love Affairs of Nathaniel P.","author":"Adelle Waldman","tracking":{"object_type":"document","object_id":182546874,"track":"flattened_recommender","doc_uuid":"gE33NOqor//XzXsE1uPSzLFqLV4="},"url":"https://www.scribd.com/book/182546874/The-Love-Affairs-of-Nathaniel-P-A-Novel"},"182553141":{"type":"book","id":182553141,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/182553141/108x144/1b40063d80/1537785503?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182553141/216x288/098f7f1651/1537785503?v=1","title":"The World Is Flat 3.0: A Brief History of the Twenty-first Century","short_title":"The World Is Flat 3.0","author":"Thomas L. Friedman","tracking":{"object_type":"document","object_id":182553141,"track":"flattened_recommender","doc_uuid":"usNXjHOxAqNScXAfnpgWo3puO0I="},"url":"https://www.scribd.com/book/182553141/The-World-Is-Flat-3-0-A-Brief-History-of-the-Twenty-first-Century"},"182560283":{"type":"book","id":182560283,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/182560283/108x144/229169a793/1537783845?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182560283/216x288/fc0b9ebffa/1537783845?v=1","title":"Wolf Hall: A Novel","short_title":"Wolf Hall","author":"Hilary Mantel","tracking":{"object_type":"document","object_id":182560283,"track":"flattened_recommender","doc_uuid":"Pdq6GQn7cAl9mxo4JdmvihiGcnA="},"url":"https://www.scribd.com/book/182560283/Wolf-Hall-A-Novel"},"182565115":{"type":"book","id":182565115,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/182565115/108x144/50e3fc9eb2/1537784443?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/182565115/216x288/8bbf81282a/1537784443?v=1","title":"The Silver Linings Playbook: A Novel","short_title":"The Silver Linings Playbook","author":"Matthew Quick","tracking":{"object_type":"document","object_id":182565115,"track":"flattened_recommender","doc_uuid":"tHpTdRCW8Um4gB2UZzVbQeQqkrQ="},"url":"https://www.scribd.com/book/182565115/The-Silver-Linings-Playbook-A-Novel"},"202691564":{"type":"book","id":202691564,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/202691564/108x144/f0e6e6416d/1537788668?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/202691564/216x288/56a5d067c6/1537788668?v=1","title":"Smart People Should Build Things: How to Restore Our Culture of Achievement, Build a Path for Entrepreneurs, and Create New Jobs in America","short_title":"Smart People Should Build Things","author":"Andrew Yang","tracking":{"object_type":"document","object_id":202691564,"track":"flattened_recommender","doc_uuid":"Z1ktt/fP0QL87mBcXnH3SU+g540="},"url":"https://www.scribd.com/book/202691564/Smart-People-Should-Build-Things-How-to-Restore-Our-Culture-of-Achievement-Build-a-Path-for-Entrepreneurs-and-Create-New-Jobs-in-America"},"211302755":{"type":"book","id":211302755,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/211302755/108x144/2424de51a2/1537789483?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/211302755/216x288/09ee7462f3/1537789483?v=1","title":"The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers","short_title":"The Hard Thing About Hard Things","author":"Ben Horowitz","tracking":{"object_type":"document","object_id":211302755,"track":"flattened_recommender","doc_uuid":"VWDac+9WQv14dIeti6hklhrSEfE="},"url":"https://www.scribd.com/book/211302755/The-Hard-Thing-About-Hard-Things-Building-a-Business-When-There-Are-No-Easy-Answers"},"212863738":{"type":"book","id":212863738,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/212863738/108x144/5bad102ef1/1537787551?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/212863738/216x288/8fc36df455/1537787551?v=1","title":"The Unwinding: An Inner History of the New America","short_title":"The Unwinding","author":"George Packer","tracking":{"object_type":"document","object_id":212863738,"track":"flattened_recommender","doc_uuid":"nrf8u8khGOhmZfCdnWUh3OnHhWk="},"url":"https://www.scribd.com/book/212863738/The-Unwinding-An-Inner-History-of-the-New-America"},"216442529":{"type":"book","id":216442529,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/216442529/108x144/7945e537de/1537783716?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/216442529/216x288/95db88293e/1537783716?v=1","title":"Lovers at the Chameleon Club, Paris 1932: A Novel","short_title":"Lovers at the Chameleon Club, Paris 1932","author":"Francine Prose","tracking":{"object_type":"document","object_id":216442529,"track":"flattened_recommender","doc_uuid":"Ef7xt698csDyuMLjPSpUtyros3g="},"url":"https://www.scribd.com/book/216442529/Lovers-at-the-Chameleon-Club-Paris-1932-A-Novel"},"224248520":{"type":"book","id":224248520,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224248520/108x144/57b8f15c1c/1537790791?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224248520/216x288/2fc602273a/1537790791?v=1","title":"The Kitchen House: A Novel","short_title":"The Kitchen House","author":"Kathleen Grissom","tracking":{"object_type":"document","object_id":224248520,"track":"flattened_recommender","doc_uuid":"JIV9okncSwr9qy4Z4zYHJiubhHE="},"url":"https://www.scribd.com/book/224248520/The-Kitchen-House-A-Novel"},"224248577":{"type":"book","id":224248577,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224248577/108x144/d525463c67/1537776259?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224248577/216x288/2b59844b99/1537776259?v=1","title":"The Rosie Project: A Novel","short_title":"The Rosie Project","author":"Graeme Simsion","tracking":{"object_type":"document","object_id":224248577,"track":"flattened_recommender","doc_uuid":"xOkEhVdke1oaVHhz7eJcd2kzANA="},"url":"https://www.scribd.com/book/224248577/The-Rosie-Project-A-Novel"},"224252178":{"type":"book","id":224252178,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224252178/108x144/68dbc1000d/1537781939?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224252178/216x288/57a65a5750/1537781939?v=1","title":"Brooklyn: A Novel","short_title":"Brooklyn","author":"Colm Toibin","tracking":{"object_type":"document","object_id":224252178,"track":"flattened_recommender","doc_uuid":"s52FLO+jhxu92bZqC6BAFDIqHI8="},"url":"https://www.scribd.com/book/224252178/Brooklyn-A-Novel"},"224258670":{"type":"book","id":224258670,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224258670/108x144/3c7a87a449/1537793861?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224258670/216x288/ef3c1ca84d/1537793861?v=1","title":"The Prize: The Epic Quest for Oil, Money & Power","short_title":"The Prize","author":"Daniel Yergin","tracking":{"object_type":"document","object_id":224258670,"track":"flattened_recommender","doc_uuid":"ffcVBEhqaNm9Dsse6i15s0jaEkc="},"url":"https://www.scribd.com/book/224258670/The-Prize-The-Epic-Quest-for-Oil-Money-Power"},"224266633":{"type":"book","id":224266633,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224266633/108x144/d0de7b5bf4/1537794150?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224266633/216x288/a40600a76d/1537794150?v=1","title":"The Perks of Being a Wallflower","short_title":"The Perks of Being a Wallflower","author":"Stephen Chbosky","tracking":{"object_type":"document","object_id":224266633,"track":"flattened_recommender","doc_uuid":"1vQBsouaqJ6qxnZLO2mLEeXQSXg="},"url":"https://www.scribd.com/book/224266633/The-Perks-of-Being-a-Wallflower"},"224270540":{"type":"book","id":224270540,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224270540/108x144/f484685ce1/1537819642?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224270540/216x288/f0d4e09ce0/1537819642?v=1","title":"The Master","short_title":"The Master","author":"Colm Toibin","tracking":{"object_type":"document","object_id":224270540,"track":"flattened_recommender","doc_uuid":"JI06lTRpB3PYxEWLnm+4Lvk/y9Q="},"url":"https://www.scribd.com/book/224270540/The-Master"},"224285255":{"type":"book","id":224285255,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224285255/108x144/144bc668f6/1537776192?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224285255/216x288/9dbee53a6c/1537776192?v=1","title":"The Flamethrowers: A Novel","short_title":"The Flamethrowers","author":"Rachel Kushner","tracking":{"object_type":"document","object_id":224285255,"track":"flattened_recommender","doc_uuid":"DbKL6dOwx2Vx2t7OKPL8BBOeAHQ="},"url":"https://www.scribd.com/book/224285255/The-Flamethrowers-A-Novel"},"224306619":{"type":"book","id":224306619,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224306619/108x144/7eeca5a1bc/1537790771?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224306619/216x288/4a8f75444a/1537790771?v=1","title":"The Light Between Oceans: A Novel","short_title":"The Light Between Oceans","author":"M.L. Stedman","tracking":{"object_type":"document","object_id":224306619,"track":"flattened_recommender","doc_uuid":"/N2FvA5+CYxAAvECNkJxkOjVaxU="},"url":"https://www.scribd.com/book/224306619/The-Light-Between-Oceans-A-Novel"},"224326250":{"type":"book","id":224326250,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224326250/108x144/b659f5fb6a/1537786890?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224326250/216x288/900e8864ca/1537786890?v=1","title":"Steve Jobs","short_title":"Steve Jobs","author":"Walter Isaacson","tracking":{"object_type":"document","object_id":224326250,"track":"flattened_recommender","doc_uuid":"TRDNI2oZfFdy7gB+MYrAwqxIvDI="},"url":"https://www.scribd.com/book/224326250/Steve-Jobs"},"224349281":{"type":"book","id":224349281,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224349281/108x144/4df0918cea/1537795347?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224349281/216x288/befa0c6317/1537795347?v=1","title":"How To Win Friends and Influence People","short_title":"How To Win Friends and Influence People","author":"Dale Carnegie","tracking":{"object_type":"document","object_id":224349281,"track":"flattened_recommender","doc_uuid":"8gZlZsqLNUfSrDSARy7vNNZwyLw="},"url":"https://www.scribd.com/book/224349281/How-To-Win-Friends-and-Influence-People"},"224355300":{"type":"book","id":224355300,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224355300/108x144/0f2130a60a/1537783343?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224355300/216x288/9b9b19254a/1537783343?v=1","title":"Grand Pursuit: The Story of Economic Genius","short_title":"Grand Pursuit","author":"Sylvia Nasar","tracking":{"object_type":"document","object_id":224355300,"track":"flattened_recommender","doc_uuid":"9nmzXKssy4/1qEGMDR+AVKJ5EZQ="},"url":"https://www.scribd.com/book/224355300/Grand-Pursuit-The-Story-of-Economic-Genius"},"224369806":{"type":"book","id":224369806,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224369806/108x144/6fb23377a8/1537821927?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224369806/216x288/b1d476d0fb/1537821927?v=1","title":"The Emperor of All Maladies: A Biography of Cancer","short_title":"The Emperor of All Maladies","author":"Siddhartha Mukherjee","tracking":{"object_type":"document","object_id":224369806,"track":"flattened_recommender","doc_uuid":"7GpCHHMxSiFUrvRPzJyk8OwIp0s="},"url":"https://www.scribd.com/book/224369806/The-Emperor-of-All-Maladies-A-Biography-of-Cancer"},"224410295":{"type":"book","id":224410295,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224410295/108x144/514b1bea0b/1537783195?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/224410295/216x288/f7c9469e6c/1537783195?v=1","title":"Team of Rivals: The Political Genius of Abraham Lincoln","short_title":"Team of Rivals","author":"Doris Kearns Goodwin","tracking":{"object_type":"document","object_id":224410295,"track":"flattened_recommender","doc_uuid":"JF/VCLrNk9LtP8Pd2qGUhTkX6so="},"url":"https://www.scribd.com/book/224410295/Team-of-Rivals-The-Political-Genius-of-Abraham-Lincoln"},"224419023":{"type":"book","id":224419023,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224419023/108x144/48b209bbb5/1537783164?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224419023/216x288/39263c2334/1537783164?v=1","title":"John Adams","short_title":"John Adams","author":"David McCullough","tracking":{"object_type":"document","object_id":224419023,"track":"flattened_recommender","doc_uuid":"UwifL5AQvpB+tHGrcKCcmyilJ20="},"url":"https://www.scribd.com/book/224419023/John-Adams"},"224426877":{"type":"book","id":224426877,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224426877/108x144/f22cf865fe/1537780478?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/224426877/216x288/a73f25e252/1537780478?v=1","title":"Angela's Ashes: A Memoir","short_title":"Angela's Ashes","author":"Frank McCourt","tracking":{"object_type":"document","object_id":224426877,"track":"flattened_recommender","doc_uuid":"Nk2cQHcFt8KcKdGROIaMeO5AxnM="},"url":"https://www.scribd.com/book/224426877/Angela-s-Ashes-A-Memoir"},"224519118":{"type":"document","id":224519118,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/224519118/108x144/e8944d21e3/1452192164?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/224519118/216x288/33b5a78abd/1452192164?v=1","title":"Java Interview Questions","short_title":"Java Interview Questions","author":"psundarau","tracking":{"object_type":"document","object_id":224519118,"track":"flattened_recommender","doc_uuid":"ss36RIxOHDNvboYlhA4dOnv5aro="},"url":"https://www.scribd.com/document/224519118/Java-Interview-Questions"},"225916486":{"type":"book","id":225916486,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/225916486/108x144/241cf75eb3/1537786261?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/225916486/216x288/a042fe186a/1537786261?v=1","title":"A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story","short_title":"A Heartbreaking Work Of Staggering Genius","author":"Dave Eggers","tracking":{"object_type":"document","object_id":225916486,"track":"flattened_recommender","doc_uuid":"1rv3vmIipZzUn2jxN88t9zkBaz0="},"url":"https://www.scribd.com/book/225916486/A-Heartbreaking-Work-Of-Staggering-Genius-A-Memoir-Based-on-a-True-Story"},"231689346":{"type":"book","id":231689346,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/231689346/108x144/7e5fbbde4a/1537776550?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/231689346/216x288/b7fe80231f/1537776550?v=1","title":"The Blazing World: A Novel","short_title":"The Blazing World","author":"Siri Hustvedt","tracking":{"object_type":"document","object_id":231689346,"track":"flattened_recommender","doc_uuid":"Z0rmV1IQP9m55BZmkLA66YRdSVI="},"url":"https://www.scribd.com/book/231689346/The-Blazing-World-A-Novel"},"234028503":{"type":"book","id":234028503,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/234028503/108x144/2c4440aa6c/1537787913?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/234028503/216x288/cfe54b8013/1537787913?v=1","title":"Bad Feminist: Essays","short_title":"Bad Feminist","author":"Roxane Gay","tracking":{"object_type":"document","object_id":234028503,"track":"flattened_recommender","doc_uuid":"YxzQPLANnvxJF7432MKNPnOK1Qc="},"url":"https://www.scribd.com/book/234028503/Bad-Feminist-Essays"},"235411767":{"type":"book","id":235411767,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/235411767/108x144/b2ad7aa7d5/1537782987?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/235411767/216x288/1740216c8c/1537782987?v=1","title":"A Man Called Ove: A Novel","short_title":"A Man Called Ove","author":"Fredrik Backman","tracking":{"object_type":"document","object_id":235411767,"track":"flattened_recommender","doc_uuid":"smUPf+6QYZ4BikBc24YKSxL9g7s="},"url":"https://www.scribd.com/book/235411767/A-Man-Called-Ove-A-Novel"},"235583696":{"type":"book","id":235583696,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/235583696/108x144/a9f15763be/1537789636?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/235583696/216x288/7c5ab0af0f/1537789636?v=1","title":"We Are Not Ourselves: A Novel","short_title":"We Are Not Ourselves","author":"Matthew Thomas","tracking":{"object_type":"document","object_id":235583696,"track":"flattened_recommender","doc_uuid":"EJZboWVcREt6+KYjtZSRNPdZB7M="},"url":"https://www.scribd.com/book/235583696/We-Are-Not-Ourselves-A-Novel"},"238704340":{"type":"book","id":238704340,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/238704340/108x144/2fd0be1590/1537785058?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/238704340/216x288/191539db56/1537785058?v=1","title":"This Changes Everything: Capitalism vs. The Climate","short_title":"This Changes Everything","author":"Naomi Klein","tracking":{"object_type":"document","object_id":238704340,"track":"flattened_recommender","doc_uuid":"NvYHEFG3GPJcDKKgx26x2lwNhV8="},"url":"https://www.scribd.com/book/238704340/This-Changes-Everything-Capitalism-vs-The-Climate"},"239488191":{"type":"book","id":239488191,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/239488191/108x144/a9a21bdc0e/1537779946?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/239488191/216x288/73448c1779/1537779946?v=1","title":"The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution","short_title":"The Innovators","author":"Walter Isaacson","tracking":{"object_type":"document","object_id":239488191,"track":"flattened_recommender","doc_uuid":"6eV35YBv4IbCork+XhNhuBerKjs="},"url":"https://www.scribd.com/book/239488191/The-Innovators-How-a-Group-of-Hackers-Geniuses-and-Geeks-Created-the-Digital-Revolution"},"239588474":{"type":"book","id":239588474,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/239588474/108x144/149fb5e6af/1537832245?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/239588474/216x288/15f36354f8/1537832245?v=1","title":"Rise of ISIS: A Threat We Can't Ignore","short_title":"Rise of ISIS","author":"Jay Sekulow","tracking":{"object_type":"document","object_id":239588474,"track":"flattened_recommender","doc_uuid":"cjJdKwrsUs0OKLzChOe77BPWgUk="},"url":"https://www.scribd.com/book/239588474/Rise-of-ISIS-A-Threat-We-Can-t-Ignore"},"244157917":{"type":"book","id":244157917,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/244157917/108x144/c55ae5929d/1537785375?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/244157917/216x288/c42f4ff9aa/1537785375?v=1","title":"Yes Please","short_title":"Yes Please","author":"Amy Poehler","tracking":{"object_type":"document","object_id":244157917,"track":"flattened_recommender","doc_uuid":"hZD1JFT3p+ZJDkZ/jl/ttTX95Is="},"url":"https://www.scribd.com/book/244157917/Yes-Please"},"245201100":{"type":"document","id":245201100,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/245201100/108x144/52cde7fed8/1422832771?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/245201100/216x288/9116649017/1422832771?v=1","title":"Conceptos de J2EE","short_title":"Conceptos de J2EE","author":"Mario Bolo","tracking":{"object_type":"document","object_id":245201100,"track":"flattened_recommender","doc_uuid":"oHeLo+Bg54hVumfrEqh40nh0L6M="},"url":"https://www.scribd.com/document/245201100/Conceptos-de-J2EE"},"246897514":{"type":"book","id":246897514,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/246897514/108x144/60f21686b1/1537791268?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/246897514/216x288/4b640ccfe4/1537791268?v=1","title":"The Wallcreeper","short_title":"The Wallcreeper","author":"Nell Zink","tracking":{"object_type":"document","object_id":246897514,"track":"flattened_recommender","doc_uuid":"XeaZ5WhdE5w7jwsZL0N9CeOXioo="},"url":"https://www.scribd.com/book/246897514/The-Wallcreeper"},"249308236":{"type":"book","id":249308236,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/249308236/108x144/0b356a7d6a/1537780398?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249308236/216x288/cbef455d67/1537780398?v=1","title":"Interpreter of Maladies","short_title":"Interpreter of Maladies","author":"Jhumpa Lahiri","tracking":{"object_type":"document","object_id":249308236,"track":"flattened_recommender","doc_uuid":"V1K2fSLuixnXrYw5bGLpp92uzTo="},"url":"https://www.scribd.com/book/249308236/Interpreter-of-Maladies"},"249308781":{"type":"book","id":249308781,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249308781/108x144/8ccbad3c4a/1537788002?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249308781/216x288/b0591f1a45/1537788002?v=1","title":"Life of Pi","short_title":"Life of Pi","author":"Yann Martel","tracking":{"object_type":"document","object_id":249308781,"track":"flattened_recommender","doc_uuid":"3VFPZiBqVitSk6pYpbiLJdUk0qY="},"url":"https://www.scribd.com/book/249308781/Life-of-Pi"},"249309502":{"type":"book","id":249309502,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/249309502/108x144/06f5527c5d/1537781789?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249309502/216x288/ec3bf7c24b/1537781789?v=1","title":"Extremely Loud and Incredibly Close: A Novel","short_title":"Extremely Loud and Incredibly Close","author":"Jonathan Safran Foer","tracking":{"object_type":"document","object_id":249309502,"track":"flattened_recommender","doc_uuid":"r4enyZDsvXku9Kh0V8szS86dRIg="},"url":"https://www.scribd.com/book/249309502/Extremely-Loud-and-Incredibly-Close-A-Novel"},"249309690":{"type":"book","id":249309690,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249309690/108x144/48e07febe4/1537787460?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/249309690/216x288/aa98599d5e/1537787460?v=1","title":"Everything Is Illuminated","short_title":"Everything Is Illuminated","author":"Jonathan Safran Foer","tracking":{"object_type":"document","object_id":249309690,"track":"flattened_recommender","doc_uuid":"pKNe/Fv/hKAQxPrRf5J9ohpGp/Q="},"url":"https://www.scribd.com/book/249309690/Everything-Is-Illuminated"},"250006950":{"type":"book","id":250006950,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/250006950/108x144/2a1edbdeca/1537780946?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/250006950/216x288/139a0bb438/1537780946?v=1","title":"The First Bad Man: A Novel","short_title":"The First Bad Man","author":"Miranda July","tracking":{"object_type":"document","object_id":250006950,"track":"flattened_recommender","doc_uuid":"R7qalqnSqjeYEl4eDoJYAUkyDmg="},"url":"https://www.scribd.com/book/250006950/The-First-Bad-Man-A-Novel"},"250095204":{"type":"document","id":250095204,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/250095204/108x144/37cc4f9420/1418570600?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/250095204/216x288/e8a95a6ba8/1418570600?v=1","title":"do not search","short_title":"do not search","author":"prasunnatasha","tracking":{"object_type":"document","object_id":250095204,"track":"flattened_recommender","doc_uuid":"1yHD4XGAjtJuhK3PnZa29Z42OmE="},"url":"https://www.scribd.com/document/250095204/do-not-search"},"253264900":{"type":"book","id":253264900,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/253264900/108x144/dcda7770b5/1537789840?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/253264900/216x288/ca2dc9eb25/1537789840?v=1","title":"Sapiens: A Brief History of Humankind","short_title":"Sapiens","author":"Yuval Noah Harari","tracking":{"object_type":"document","object_id":253264900,"track":"flattened_recommender","doc_uuid":"mA6jisTyy9C8TTogsTIamycxqT8="},"url":"https://www.scribd.com/book/253264900/Sapiens-A-Brief-History-of-Humankind"},"254039238":{"type":"book","id":254039238,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/254039238/108x144/a8c6c5e065/1537800690?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/254039238/216x288/0e4e5ae0d4/1537800690?v=1","title":"Leaving Berlin: A Novel","short_title":"Leaving Berlin","author":"Joseph Kanon","tracking":{"object_type":"document","object_id":254039238,"track":"flattened_recommender","doc_uuid":"BefQBabkZzP8ByM1jOTD5d1rNy4="},"url":"https://www.scribd.com/book/254039238/Leaving-Berlin-A-Novel"},"261362178":{"type":"document","id":261362178,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/261362178/108x144/00297d96b4/1428591458?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/261362178/216x288/903f86206f/1428591458?v=1","title":"JF_V01_S03_L02","short_title":"JF_V01_S03_L02","author":"Muhammad Hudzaifah","tracking":{"object_type":"document","object_id":261362178,"track":"flattened_recommender","doc_uuid":"5qbCEw7chyMN6exJoUtMdh3FvzA="},"url":"https://www.scribd.com/document/261362178/JF-V01-S03-L02"},"263504218":{"type":"book","id":263504218,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/263504218/108x144/986fa89e8b/1537787611?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/263504218/216x288/c40eb7e9a8/1537787611?v=1","title":"Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future","short_title":"Elon Musk","author":"Ashlee Vance","tracking":{"object_type":"document","object_id":263504218,"track":"flattened_recommender","doc_uuid":"OjnqwqJv80maLzCPWDt/9FPyk24="},"url":"https://www.scribd.com/book/263504218/Elon-Musk-Tesla-SpaceX-and-the-Quest-for-a-Fantastic-Future"},"267320324":{"type":"document","id":267320324,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/267320324/108x144/684f144251/1433176696?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/267320324/216x288/6c70ecaf0e/1433176696?v=1","title":"R09220503-OBJECTORIENTEDPROGRAMMING (2).pdf","short_title":"R09220503-OBJECTORIENTEDPROGRAMMING (2).pdf","author":"saiteja1234","tracking":{"object_type":"document","object_id":267320324,"track":"flattened_recommender","doc_uuid":"Vt7oCMtweZPNZmjW41jUlzzBiso="},"url":"https://www.scribd.com/document/267320324/R09220503-OBJECTORIENTEDPROGRAMMING-2-pdf"},"273440534":{"type":"book","id":273440534,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/273440534/108x144/b7e49e07d3/1537787686?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/273440534/216x288/aaec1b2b1a/1537787686?v=1","title":"The Incarnations: A Novel","short_title":"The Incarnations","author":"Susan Barker","tracking":{"object_type":"document","object_id":273440534,"track":"flattened_recommender","doc_uuid":"nmpHOmU9k+NeMMWhVBM3IwIcI5I="},"url":"https://www.scribd.com/book/273440534/The-Incarnations-A-Novel"},"273582508":{"type":"book","id":273582508,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/273582508/108x144/fb92cadae3/1537788503?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/273582508/216x288/135562ba06/1537788503?v=1","title":"You Too Can Have a Body Like Mine: A Novel","short_title":"You Too Can Have a Body Like Mine","author":"Alexandra Kleeman","tracking":{"object_type":"document","object_id":273582508,"track":"flattened_recommender","doc_uuid":"K9Cppr/Kd9Fxx/32s+uQs7BQm6s="},"url":"https://www.scribd.com/book/273582508/You-Too-Can-Have-a-Body-Like-Mine-A-Novel"},"282766939":{"type":"book","id":282766939,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/282766939/108x144/1355dd3a71/1537788003?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/282766939/216x288/076d3f356c/1537788003?v=1","title":"Dispatches from Pluto: Lost and Found in the Mississippi Delta","short_title":"Dispatches from Pluto","author":"Richard Grant","tracking":{"object_type":"document","object_id":282766939,"track":"flattened_recommender","doc_uuid":"2gTCV2mXVA7564MztBV+ahy4pP0="},"url":"https://www.scribd.com/book/282766939/Dispatches-from-Pluto-Lost-and-Found-in-the-Mississippi-Delta"},"293461549":{"type":"book","id":293461549,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/293461549/108x144/07628d60db/1537783975?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/word_document/293461549/216x288/8d1185b7ff/1537783975?v=1","title":"The New Confessions of an Economic Hit Man","short_title":"The New Confessions of an Economic Hit Man","author":"John Perkins","tracking":{"object_type":"document","object_id":293461549,"track":"flattened_recommender","doc_uuid":"5yCVMojILnJXxVbsr+lTi72NadM="},"url":"https://www.scribd.com/book/293461549/The-New-Confessions-of-an-Economic-Hit-Man"},"293991407":{"type":"document","id":293991407,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/293991407/108x144/ddbbea8f56/1451025574?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/293991407/216x288/a6a925e5ca/1451025574?v=1","title":"Java Beans Explained in Detail","short_title":"Java Beans Explained in Detail","author":"Balaji_SAP","tracking":{"object_type":"document","object_id":293991407,"track":"flattened_recommender","doc_uuid":"cOw/BvkkGXJtz93l2/7tdnjD1AY="},"url":"https://www.scribd.com/document/293991407/Java-Beans-Explained-in-Detail"},"315772597":{"type":"document","id":315772597,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/315772597/108x144/aa1ef53c79/1465977728?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/315772597/216x288/dde6a09502/1465977728?v=1","title":"Optimization Techniques for Java & J2EE Applications","short_title":"Optimization Techniques for Java & J2EE Applications","author":"santhosh","tracking":{"object_type":"document","object_id":315772597,"track":"flattened_recommender","doc_uuid":"VMAQzeoBU91VWHgGwa74oXns1Po="},"url":"https://www.scribd.com/doc/315772597/Optimization-Techniques-for-Java-J2EE-Applications"},"316983783":{"type":"document","id":316983783,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/316983783/108x144/57b650c04d/1467152742?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/316983783/216x288/a435c825e0/1467152742?v=1","title":"KeerthiP","short_title":"KeerthiP","author":"phani","tracking":{"object_type":"document","object_id":316983783,"track":"flattened_recommender","doc_uuid":"4JkZXNu9VEh1yApya1zny2TAnUE="},"url":"https://www.scribd.com/document/316983783/KeerthiP"},"328225948":{"type":"document","id":328225948,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/328225948/108x144/982f3de4df/1476932993?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/328225948/216x288/673d08e9ed/1476932993?v=1","title":"Object Oriented Programming Basics","short_title":"Object Oriented Programming Basics","author":"Katie Ruiz","tracking":{"object_type":"document","object_id":328225948,"track":"flattened_recommender","doc_uuid":"uRnfe7WO73Be+23NNSq8Ywscsf0="},"url":"https://www.scribd.com/document/328225948/Object-Oriented-Programming-Basics"},"337536061":{"type":"book","id":337536061,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/337536061/108x144/8c1b451da6/1537791429?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/word_document/337536061/216x288/45d81f5c37/1537791429?v=1","title":"The Sympathizer: A Novel (Pulitzer Prize for Fiction)","short_title":"The Sympathizer","author":"Viet Thanh Nguyen","tracking":{"object_type":"document","object_id":337536061,"track":"flattened_recommender","doc_uuid":"lT5+7X3Ii5bP8JLR1eYtXF4Odek="},"url":"https://www.scribd.com/book/337536061/The-Sympathizer-A-Novel-Pulitzer-Prize-for-Fiction"},"359772296":{"type":"document","id":359772296,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/359772296/108x144/5202f8ce8f/1536637999?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/359772296/216x288/2b4d4b1c10/1536637999?v=1","title":"Donald Norris Python for Microcontrollers Getting","short_title":"Donald Norris Python for Microcontrollers Getting","author":"wawanUAI","tracking":{"object_type":"document","object_id":359772296,"track":"flattened_recommender","doc_uuid":"iDZKO0tIeLp/1Mw0G7wwck69UvI="},"url":"https://www.scribd.com/document/359772296/Donald-Norris-Python-for-Microcontrollers-Getting"},"371437497":{"type":"document","id":371437497,"thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/371437497/108x144/72b8c368f8/1518538522?v=1","retina_thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/371437497/216x288/f761fc4875/1518538522?v=1","title":"Object –Oriented Database","short_title":"Object –Oriented Database","author":"dinesh_rhl","tracking":{"object_type":"document","object_id":371437497,"track":"flattened_recommender","doc_uuid":"FaKlgOC8/M5vUHTH8lWPTGbJmRc="},"url":"https://www.scribd.com/presentation/371437497/Object-Oriented-Database"},"387306131":{"type":"document","id":387306131,"thumb_url":"https://imgv2-2-f.scribdassets.com/img/document/387306131/108x144/40b10217dd/1535743512?v=1","retina_thumb_url":"https://imgv2-1-f.scribdassets.com/img/document/387306131/216x288/de5655d7a9/1535743512?v=1","title":"computer ","short_title":"computer ","author":"Nica Dacatimbang - Lerios","tracking":{"object_type":"document","object_id":387306131,"track":"flattened_recommender","doc_uuid":"fNF08fzy4kExnlgQPxP+CQjLP3c="},"url":"https://www.scribd.com/document/387306131/computer"}}},"seo_roadblock_props_path":"/doc-page/seo-roadblock-props/50441610","signup_context":null,"toolbar":{"search_path":"/search-4gen?allowed_pages=1%2C2%2C3%2C5%2C6%2C7%2C39%2C40%2C41&auth_token=BbYtSF1Pv5BpTrexK69jEap9Gv8%3D&authenticity_token=X5HDxBB46bzlwMqxvgbjBf2R3fUWtHqBOlL%2FTC74%2Fod9vDXDN%2FUclGbqVprOrXor5nFeDITnHDjopBrDKPILXg%3D%3D&expires=1538447553&wordDocumentId=50441610&wordUploadId=53229573"},"renewal_nag_props":null}-->