Posts

Showing posts from May, 2012

[Advance Java] - Features of a Web Conatiner ?

Image
Communications support The container provides an easy way for your servlets to talk to your web server. You don’t have to build a ServerSocket, listen on a port, create streams, etc. The Container knows the protocol between the web server and itself, so that your servlet doesn’t have to worry about an API between, say, the Apache web server and your own web application code. All you have to worry about is your own business logic that goes in your Servlet (like accepting an order from your online store).  Lifecycle Management The Container controls the life and death of your servlets. It takes care of loading the classes, instantiating and initializing the servlets, invoking the servlet methods, and making servlet instances eligible for garbage collection. With the Container in control, you don’t have to worry as much about resource management.  Multithreading Support The Container automatically creates a new Java thread for every servlet request it receives. When the servlet’s

[Advance Java] MVC in the Servlet & JSP world

Image

[Advance Java] What is a J2EE Application Server

Image
The Java 2 Enterprise Edition is kind of a super-spec—it incorporates other specifications, including the Servlets 2.4 spec and the JSP 2.0 spec. That’s for the web Container. But the J2EE 1.4 spec also includes the Enterprise JavaBean 2.1 specification, for the EJB Container. In other words, the web Container is for web components (Servlets and JSPs), and the EJB Container is for business components.  A fully-compliant J2EE application server must have both a web Container and an EJB Container (plus other things including a JNDI and JMS implementation). Tomcat is just a web Container! It is still compliant with the portions of the J2EE spec that address the web Container. Tomcat is a web Container, not a full J2EE application server, because Tomcat does not have an EJB Container.  A J2EE application server includes both a web Container AND an EJB Container. Tomcat is a web Container, but NOT a full J2EE application server.  A J2EE 1.4 server includes the Servlet spe

[Advance Java] What is a TCP Port?

A TCP port is just a number, a 16-bit number that identifies a specific software program on the server hardware.  Def: A port represents a logical connection to a particular piece of software running on the server hardware. Your internet web (HTTP) server software runs on port 80. That’s a standard. If you’ve got a Telnet server, it’s running on port 23. FTP? 21. POP3 mail server? 110. SMTP? 25. The Time server sits at 37. Think of ports as unique identifiers.  Using one server app per port, a server can have up to 65536 different server apps running, i.e. there could be 65536 port in a server hardware. The TCP port numbers from 0 to 1023 are reserved for well-known services (including the Big One we care about— port 80). Don’t use these ports for your own custom server programs!

[Advance Java] About the SCWCD (for Java EE 1.5) exam

Image
The updated SCWCD exam is called “Sun Certified Web Component Developer for the Java Platform, Enterprise Edition 5” (CX-310-083), but don’t get confused by the title. The updated exam is still designed for Java EE v1.4 and for the servlet v2.4 and JSP v2.0 specifications.  Do I first have to pass the SCJP? Yes. The Web Component Developer exam, the Business Component Developer exam, The Mobile Application Developer exam, the Web Services Developer exam, and the Developer exam all require you to be a Sun Certified Java Programmer. How many questions? You’ll get 69 questions when you take the exam. Not everyone gets the same 69 questions; there are many different versions of the exam. But everyone gets the same degree of difficulty, and the same balance of topics. On the real exam, expect to see at least one question from each exam objective, and there are a few objectives where you’ll get more than one question. How much time do I get to complete the exam?

[Advance Java] Difference Between Apache and Tomcat

Image
The most prevalent use of the internet today is browsing. People all around the world find information by accessing data from other computers through their browser; but beyond that, people know very little. In order to communicate with the host computer, the browser would need to request pages from a http server that is run on the host computer. It would then be responsible for finding and providing you with the right pages. An excellent and very popular web server around today is the Apache web server. It allows people who want to set-up their own web server to do so with very little trouble. Installing the Apache web server is the most basic thing you can do to support html and other related software. The next step is to install more software that complements the web server like PHP or Tomcat. Tomcat is another piece of software that is meant to enhance the usability and interactive experience that users experience with your website. Because Tomcat is also a serv