Posts

ObjectAid UML Explorer for Eclipse

Image
The ObjectAid UML Explorer for Eclipse The ObjectAid UML Explorer is an agile and lightweight code visualization tool for the Eclipse IDE. It shows your Java source code and libraries in live UML class and sequence diagrams that automatically update as your code changes. Why Another UML Tool? The ObjectAid UML Explorer is different from other UML tools. It uses the UML notation to show a graphical representation of existing code that is as accurate and up-to-date as your text editor, while being very easy to use. Several unique features make this possible: You simply drag your Java classes onto a diagram from other Eclipse views; no need to start a lengthy reverse engineering job. Your source code and libraries are the model that is displayed, they are not reverse engineered into a different format. If you update your code in Eclipse, your diagram is updated as well; there is no need to reverse engineer source code. Refactoring updates your diagram as well as you...

String in java

Image
In java, strings are objects that represents a sequence of characters.  java.lang.String class is used to create string object.  String objects are immutable.  java.lang.String class is final.  java.lang.String class is Serializable. Create String object In java, there are 2 ways to create String object: By using string literal By using new keyword 1- String literal In Java String literals are created by using double quotes. String str="india"; When we create a string literal, the JVM checks the string in constant pool first. If the string already available in the pool, a reference of the pooled instance is returned. If string doesn't available in the pool then a new string instance will created and stored in the constant pool. String str1="india";  String str2="india";  // No new instance created In this case only one object will be created. Firstly JVM will not find any string o...

Spring Bean Scopes

Image
singleton  prototype  request  session  global-session

javax.servlet.ServletConfig interface detail

Image
ServletConfig is an interface of servlet API. Implementation of which is provided by vendors. An object of type ServletConfig is created by the server for each servlet. This object has following use: 1- It is used by the server to provide Servlet specific initialization parameter to     Servlets.  2- It is used by the server to provide reference of the ServletContext object to the Servlet. 2.2- ServletConfig object is created for the Servlet. 2.3- <init-param> (if define for the Servlet) are read and store in it. 2.4- Reference of ServletContext is saved in it. 3.0- Server call the init() method of Servlet and provide the reference of ServletConfig. Method of javax.servlet.ServletConfig interface: 1- getServletContext():                                     ...

javax.servlet.ServletContext interface detail

Image
ServletContext is an interface of Servlet API. Implementation of it provided by the vendors. An object of type ServletContext is created by the server per application at the time of application deployment. This object has following use: 1- It is used by the server to store application specific initialization parameters. 2- It is used by the Servlet to share information among them self in the form of     attributes. 3- It is used by the Servlet to interact with the server that is it has interface of the server. 1.1- ServletContext object is created by the server for the application. 1.2- <context-param> defined in web.xml are read and stored in ServletContext      object. 1.3- Server provides its own reference to the ServletContext object. 2.0- Servlet read application scope initialization parameters. 2.1- Servlet share information among themselves across requests as attributes. 2.2- Servlets use ServletContext object as...

Initialization Parameters in servlet

Image
Initialization parameter represents variable textual information that is define by application developer in web.xml file and is made available to the Servlets by the web server.  Initialization parameter can be of 2 types: 1- Application specific 2- Servlet specific 1- Application specific:                                       Application specific initialization parameters represent textual information that is to be made available to all the Servlet of the application. <context-param> xml element is used for defining application specific initialization parameter in web.xml. <web-app> <context-param>* <param-name>ParameterName</param-name> <param-value>ParameterValue</param-value> </context-param> ---------...

Login Authentication program (Demonstrate the use RequestDispatcher and its method such as include() and forward() )

Image
Create Table with following field: TableName: USERINFO id                    name                 password 101                 rupendra            a@b.com 102                 rahul                  x@y.com Program save with Name: index.html <html> <head><title>Login Page</title></head> <body> <form method="get" action="loginServlet"> UserId : <input type="text" name="txtUserId"><br> Password : <input ...