How to solve the special characters problem in different type of web browsers (JavaScript):
Application server and Webserver:
The basic difference between a web server and an application server is
Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web applications
Application server can execute Enterprise application, i,e (servlets, jsps, and EJBs) it is having two containers 1. Web Container(for interpreting/executing servlets and jsps) 2. EJB container(for executing EJBs). it can perform operations like load balancing , transaction demarcation etc etc
Application server which is used to manage application at client side where as webservers are the which are used to manage portals and sites.
Serialization :
--------------
Serialization allows you to create a JVM-independent binary representation of an in-memory Java object. This external representation may be used to transfer or store the object and to recreate it in another JVM.
Object serialization is the process of saving an object's state to a sequence of bytes, as well as the process of rebuilding those bytes into a live object at some future time. The Java Serialization API provides a standard mechanism for developers to handle object serialization. The API is small and easy to use, provided the classes and methods are understood
HashSet and HashMap:
-------------------
HashSet allows us to store objects in the set where as HashMap allows us to store objects on the basis of key and value. Every object or stored object will be having key.
Contains :- method checks the hashcode value of the object, if the value found in already added list of objects in hash set ir returns true else false
----------------
public String debugPrintHashtable( Hashtable ht ) [synchronized]
{
if ( ht == null ) return "";
StringBuffer result = new StringBuffer();
for (Enumeration e = ht.keys() ; e.hasMoreElements() ;)
{
String k = (String)e.nextElement();
result.append( " [ " + k + ": " + ht.get(k) + " ] " );
}
return result.toString();
}
-----------------
public String debugPrintVector( Vector v ) [synchronized]
{
if ( v == null ) return "";
StringBuffer result = new StringBuffer();
for (int i=0; i
{
result.append( " [ " + v.get(i) + " ] " );
}
return result.toString();
}
What is lazy fetching in hibernate:
There are two types of Loading in application. Eager loading and Lazy
loading. In eager loading we will fetch all the values from the Persistent storage
and cache it. It will make serious performance issues. There we use lazy
loading to avoid that scenario.
Some times we don't need to load the child
table values In that case we have to us lazy true in .hbm file. so hibernate
will fetch only parent table values. Internally it will load the wrapper class
but it does not cache all the values till we perform operation.
Main
Advantage: It will avoid caching unnecessary values and improve performances.
----------
What is access specifier ( using default ) in method overriding ( which execption arriase)
sol: same package -- in default access specifier in overridingmethod. - output will come
different package -- it will throw bellow type error in complile time:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method bOne() from the type SubClass is not visible
at com.nano.test.OverLoading.
---------------------
In hibernate (there is no table in db then it will throw sqlgramerexception ...etc ) [ read properly exception totally]
-----------------
In this section you will learn about the Struts controller classes –
ActionServlet, RequestProcessor, ActionForm, Action,
ActionMapping and ActionForward – all residing in
org.apache.struts.action package and struts-config.xml – the Struts
Configuration file. Instead of the traditional “Here is the class – go use it”
approach, you will study the function of each component in the context of HTTP
request handling lifecycle in Struts.
No comments:
Post a Comment
I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.