Feeds:
Posts
Comments

Archive for November, 2008

Servlets

Request forward from servlet to JSP/HTML :
http://www.java-tips.org/java-ee-tips/javaserver-pages/how-to-forward-requests-from-servlet-t.html
http://www.codestyle.org/java
http://www.codestyle.org/java/servlets/faq-API.shtml
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Servlets9.html
servlet and jsp book – Head First – download
————————————————–
http://knowfree.net/2008/05/23/head-first-servlets-and-jsp-2nd-edition.kf – jsp & servlet headfirst
http://knowfree.net/2008/04/17/head-first-servlets-and-jsp-passing-the-sun-certified-web-component-developer-exam.kf
General:
———–
http://www.tech-faq.com/j2ee.shtml
 
 

Read Full Post »

JSP

http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html
http://sharat.wordpress.com/2006/09/09/77-what-are-differences-between-beanmessage-and-beanwrite

Read Full Post »

Relative path and Absolute path

http://forums.sun.com/thread.jspa?threadID=650087&messageID=3824146

Read Full Post »

What does WebServer do:
A WebServer takes the clients request and gives something back to the client.
Server responds with the status code.
a.    404 – Not found error. – The server cannot find the thing what the client asked.
b.    200 – OK. Server successfully send the response to the client what it is expecting.
What does Web Client [...]

Read Full Post »

Servlet life cycle

Servlet Life Cycle:
init()
service()
destroy()
§    container load the servlet class.
§    Container Instantiate servlet. It runs the constructor. The constructor is default one given by compiler.
§    Container calls the init() method after Servlet Instance is created. It will be called only once in servlet lifecycle, must complete before container call the service().
§    Then container call the service() method.
§    [...]

Read Full Post »

Web app Architecture

Container:
Container helps servlets.
It instantiate the servlet or make a thread to handle the request
It calls the servlet’s doGet() or doPost() method
It create HTTP request and response object to the servlet.
It manages the life cycle of servlet.
It finds the URL in DD to find the correct servlet for the request.
[...]

Read Full Post »

class Singleton{
private static Singleton singletonObject;
private static int single;
/** A private Constructor prevents any other class from instantiating. */
private Singleton(){
// Optional Code
single++;
System.out.println(“Singleton Zero ARGS Constructor:”+single);
}
public static synchronized Singleton getSingletonObject()
{
if (singletonObject == null){
singletonObject = new Singleton();
}
return singletonObject;
}
public Object clone()throws CloneNotSupportedException
{
throw new CloneNotSupportedException();
}
}
public class SingletonObjectDemo {
public static void main(String args[]){
// Singleton obj = new Singleton(); Compilation error not [...]

Read Full Post »

JVM, JRE, JDK

JVM is interpreter.
JVM is an instance of JRE comes into action when a java program is executed.
JVM + API  JRE
JVM may use Just in time compiler for interpreting or uses set of JVM instructions set.
JIIT is the part of the JVM that is used to speed up the execution time. JIT compiles parts of [...]

Read Full Post »

Interpreter and compile

The name “compiler” is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine language). A compiler is likely to perform many or all of the following operations: lexical analysis, preprocessing, parsing, semantic analysis, code generation, and code optimization.

A compiler first takes [...]

Read Full Post »

Web and application server

Webserver serves pages for viewing in web browser, application server provides exposes business logic for client applications through various protocols

Webserver exclusively handles http requests.application server serves business logic to application programs through any number of protocols.

Webserver delegation model is fairly simple,when the request comes into the webserver,it simply passes the request to the program best [...]

Read Full Post »

Older Posts »