MY mENU


Saturday 18 May 2013

Is your pc working slow ... ?


Sometimes you get angry with your computerbecause if it slow. Now I'm going to tell you how to fix this problem. Here is the few tricks to do it.
01. Uninstall unwanted applications
If you installed more software's in your computer actually it's getting slow. so if have unwanted programs in your list uninstall all ofthem. To do it follow below steps.
• In Windows XP, go to Start -> Control Panel -> Add/Remove Programs
• In Windows 7 and Vista, go to Start -> Control Panel -> Programs -> Programs and Features
• In Windows 8 go to Settings -> Control Panel -> Programs and Features
02. Remove junk files
You don't even have to click a "Save" button once while using your computer to accumulate junk files. Simply checking emails, setting your computer to hibernate or surfingthe web will build up junk files on your computer. You can remove your PC junk files using Windows inbuilt "Disk Cleanup" utility.
• In Windows XP, Vista and 7 go to Start -> All Programs -> Accessories -> System Tools -> Disk Cleanup
• In Windows 8 Press Win+R and type Cleanmgr.exe on run. now press Enter
03. Disabling auto-start applications
Many programs will set themselves to auto-start when you boot your computer, even though you might only use them once a month. These background applications can take up a lot of RAM and they make your PC toslow. That's why disabling the auto-start option for programs you don’t need can do a lot to speed up your computer. Follow this steps to stop unwanted startup programmes.
• In Windows XP go to Start -> Run -> and type msconfig on run -> go to Startup tab. now you can uncheck unwanted startup programmes.
• In Windows Vista and 7 simply type msconfig in the search box in the Start menu
• In Windows 8 Press Win+R and type msconfig on run
04. Repair and defragment the registry
It is possible to repair registry errors yourself if you are a very experienced computer user or have a know the exact origin of your problem and step-by-step instructions to fix it. But many computer users can't repair registry errors themselves. So you can download third party software to do it. PC Tools Registry Mechanic is one of the best registry repair software.
05. Removing malware
Malware can also slow down your computer, running in the background and taking up system resources. To speed up your computer, install a good anti-malware product and set it to auto-update and run scheduled scans. There have many softwares to do it. I'm recommend Malwarebytes Anti-malware to do it.

Interfaces and Classes in Servlet

Interfaces in javax.servlet package:
  • Servlet
  • ServletRequest
  • ServletResponse
  • RequestDispatcher
  • ServletConfig
  • ServletContext
  • SingleThreadModel
  • Filter
  • FilterConfig
  • FilterChain
  • ServletRequestListener
  • ServletRequestAttributeListener
  • ServletContextLitstener
  • ServletContextAttributeListener
Classes in javax.servlet package:
  • GenericServlet
  • ServetInputStream
  • ServletOutputStream
  • ServletRequestWrapper
  • ServletResponseWrapper
  • ServletRequestEvent
  • ServletContextEvent
  • ServletRequestAttributeEvent
  • ServletContextAttributeEvent
  • ServletException
  • UnavailableException
Interfaces in javax.servlet.http package:
  • HttpServletRequest
  • HttpServletResponse
  • HttpSession
  • HttpSessionListener
  • HttpSessionAttributeListener
  • HttpSessionBindingListener
  • HttpSessionActivationListener
  • HttpSessionContext (deprecated now)
Classes in javax.servlet.http package:
  • HttpServlet
  • Cookie
  • HttpServletRequestWrapper
  • HttpServletResponseWrapper
  • HttpSessionEvent
  • HttpSessionBindingEvent
  • HttpUtils (depricated now)

History of Java

James Gosling, Mike Sheridan, and Patrick Naughton initiated the java language project in June 1991.
Originally designed for small. embedded systems in electronic appliances like set-top boxes. Initially called Oak was renamed as "Java". Java is just a name not an acronym.
Originally developed by james Gosling at SUN Microsystems( which is now a subsidiary of oracle Corporation) and released in 1995. JDK 1.0 released in (January 23,1996).

Servlet Interface

Servlet Interface provides common behavior to all the servlet  Servlet interface needs to be implemented for creating any servlet (either directly or indirectly). It provides 3 life cycle methods that are used to initialize the servlet, to service the requests and to destroy the servlet and 2 non-life cycle methods.

Methods of servlet Interface: There are 5 methods in servlet interface. The init, service and destroy are the life cycle method these are invoked by the web container.
  • public void init(ServletConfig config) initializes the servlet. It is the life cycle method invoked by the web container only once.
  • public void service(ServletRequest request, ServletResponse response) provides response for the incoming request. It is invoked at each request by the web container.
  • public void destroy() is invoked only once and indicates that servlet is being destroyed.
  • public ServletCofig getServletConfig() returns the object of ServletCofig.
  • public String getServletInfo() returns information about servlet such as writer, copyright,version etc.
Example:

 import java.io.*;
import javax.servlet.*;
public class First implements Servlet{
ServletConfig config=null;

public void init(ServletConfig config){
this.config=config;
System.out.println("servlet is initialized");
}

public void service(ServletRequest req, ServletResponse res)throws IOException, ServletException{
 res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.print("<html>");<body>");
out.print("<b>Hai</b>");
out.print("</html></body>");
}

public void destroy(){ 
System.out.println("Servlet is destroyed");
}

pulbic ServletCofig getServletConfig(){ 
return config;
}

public String getServletInfo(){
return "copyrith @ futureimpact"
}