Saturday, 14 June 2014

How to remove autorun.inf file from your drive your USB flash drive

STEP 1:
               go to run type cmd and hit ENTER
             
STEP 2:
               After that go to your specified drive or your USB drive
           
STEP 3:
                type below command
               
                attrib -r -s  -h *.*

               or
   
              attrib -r -s  -h  autorun.inf
STEP 4:
            Now delete file using below command
           
            del autorun.inf   press enter


          with this step you already done
          enjoy..........................


How to Speed up Firefox

STEP 1:
               Open Mozilla Firefox and type in "about:config" in the address bar of your Firefox browser and press ENTER.

STEP 2: 
                 Just click on ‘I’ll be careful, I promise!’ to proceed on.


STEP  3 :
                  First you select ‘network.http.max-connections-per-server’
                  Right click on this setting and choose to ‘Modify’.
                  new value is 32 as integer.

STEP 4 :
                 As per above process you shoud follow for below contain.

                  
  • network.http.max-persistent-connections-per-proxy :     16.
  • network.http.max-connections :       64.
  • network.http.max-persistent-connections-per-server :       10
  • network.http.pipelining :  true   [Right click and select "Toggle" to change status].
  • network.http.max-persistent-connections-per-proxy.      8
  • network.http.proxy.pipelining         true
  • network.http.request.timeout     300 (if it is not in the list  you can do this creating new integer preference).
  • network.http.pipelining.maxrequests     200
  • network.http.request.max-start-delay       0
  • network.http.proxy.pipelining      true
  • network.http.proxy.version     1.0

Wednesday, 23 April 2014

How to create Session in jsp

             
STEP 1:   Create folder in webapps which is exising in Apache Tomcat folder
           
                Folder name as Session_example
STEP 2:   Now in Session_example folder you have to create index.html file and code as Below


               <html>

               <head>

               <title>Wel come</title>


               </head>

              <body bgcolor="#660099">



            <form name="form1" method="post" action="http://localhost:8080/Session_example             
                                                                                                 /sessionex.jsp" >

               <h1 align="center"><u>Sesssion examlpe</u></h1>
               <table width="350" align="center" style="font-family:Calibri;color:white;"  cellpadding="0" 
                cellspacing="0">
               <tr>
               <td><br>
                                Enter your name:&nbsp;&nbsp;</td>
               <td><br><input type="text" name="name" value=""> </td>
               </tr>
               <tr>
               <td><br>Enter your Surname:&nbsp;&nbsp;</td>
               <td ><br>
               <input type="text" name="sname" value=""></td>
               </tr>
               <tr>
               <td>&nbsp;</td>
               <td colspan="2"><br><input type="submit"  value="show"></td>
               </tr>
    
              </table>

              </form>

              </body>
              </html>

       
             I hope you have created it.


STEP 3: In Session_example folder create your jsp file in notepad code as below
              as per below code
           
           <% 


                String Name = request.getParameter("name");
                String sName = request.getParameter("sname");


                if (Name != null && Name.length() > 0)
                     {
                           session.setAttribute(Name, sName);
                     }
         
         
                 String value = session.getAttribute(Name).toString();
                 out.println("Your Session Name : "+Name + "<br>" +"Your Session Value : "+ value);




              %>





   STEP 4:After complation of your programm you have to open Apche server in
              browser
    
             like ,
                    http://localhost:8080/

            click on manager apps
             and then clcik on list of Application
            After that you found your example name as Session_example
           Click on Session_example link

   

Enjoy........   


Download Example

Downlod files and Extract in webapps folder

How to print Request Header Information using Servlet

First of all,

STEP 1:   Create folder in webapps which is exising in Apache Tomcat folder
           
                Folder name as RequestHeaders

STEP 2:   Now in Hello folder you have to create index.html file and code as Below


                 <html>
                 <head>
                 <title>Wel come</title>
                 </head>

               <body >
                              <a href="RequestHeaders">Click here</a>


               </body>
                </html>
       
             I hope you have created it.

STEP 3: After that create new folder in RequestHeaders foder which name is WEB-INF

STEP 4: Now create one file which name is web.xml and make sure it's extenstion is .xml and coded
              with below code
        
             <web-app>
                 <servlet>
                               <servlet-name>RequestHeaders</servlet-name>
                               <servlet-class>RequestHeaders</servlet-class>
                </servlet>
          
                <servlet-mapping>
                              <servlet-name>RequestHeaders</servlet-name>
                              <url-pattern>/RequestHeaders</url-pattern>
               </servlet-mapping>

             </web-app>

            this file used to mapping between servlet to your servlet file
  
STEP 5: Now create one folder in WEB-INF foder which name is classes

STEP 6: In classes folder create your servlet file which name is Hello.java
              complie it
              as per below code
           
              import java.io.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              import java.util.*;



           public class RequestHeaders extends HttpServlet {
           public void doGet(HttpServletRequest request,
                                                              HttpServletResponse response)
                     throws ServletException, IOException
    {
               response.setContentType("text/html");
               PrintWriter out = response.getWriter();
               String title = "Servlet Example: Showing Request Headers";
               String docType =
                        "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
                            "Transitional//EN\">\n";
                out.println(docType +
                "<HTML>\n" +
                "<HEAD><TITLE>" + title + "</TITLE></HEAD>\n" +
                "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                "<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +
                "<B>Request Method: </B>" +
                request.getMethod() + "<BR>\n" +
                "<B>Request URI: </B>" +
                request.getRequestURI() + "<BR>\n" +
                "<B>Request Protocol: </B>" +
                request.getProtocol() + "<BR><BR>\n" +
                "<TABLE BORDER=1 ALIGN=\"CENTER\">\n" +
                "<TR BGCOLOR=\"#FFAD00\">\n" +
                "<TH>Header Name<TH>Header Value");
                  Enumeration headerNames = request.getHeaderNames();

                    while(headerNames.hasMoreElements()) {
                      String headerName = (String)headerNames.nextElement();
                      out.println("<TR><TD>" + headerName);
                  out.println("    <TD>" + request.getHeader(headerName));
            }
                    out.println("</TABLE>\n</BODY></HTML>");
         }



                 public void doPost(HttpServletRequest request,
                                                     HttpServletResponse response)
                                                     throws ServletException, IOException {
                                                  doGet(request, response);
                                                  }
                               }


STEP 7:After complation of your programm you have to open Apche server in
              browser
    
             like ,
                    http://localhost:8080/

            click on manager apps
             and then clcik on list of Application
            After that you found your example name as RequestHeaders,
           Click on RequestHeaders link

   

Enjoy........  

Download Example

Downlod files and Extract in webapps folder

How to print Hello world in jsp


STEP 1:   Create folder in webapps which is exising in Apache Tomcat folder
            
                Folder name as Print Hello

STEP 2:   Now in Print Hello folder you have to create index.html file and code as Below


                 <html>
                 <head>
                 <title>Wel come</title>
                 </head>

               <body >
                              <a href="Hello.jsp">Click here</a>


               </body>
                </html>
        
             I hope you have created it.


STEP 3: In Print hello folder create your jsp file in notepad code as below
              as per below code
           
               <%

                     out.println("Hello,world");

                %>
   
STEP 7:After complation of your programm you have to open Apche server in
              browser
     
             like ,
                    http://localhost:8080/

            click on manager apps
             and then clcik on list of Application
            After that you found your example name as Print Hello
           Click on Hello link

    

Enjoy........   

Download Example


Downlod files and Extract in webapps folder

How to craete colorful comments text in winrar

First of all, go to on your command prompt

type below code

copy con D:\esc.txt

now hold down  ALT key and type 27 from your num pad.  Now

Release ALT key


Goto to your D: drive and open esc.txt and paste below color code befor your text


0;1;37m
White text, Black background.

[0;1;37;30m
Grey text, Black background.

[0;1;37;31m
Red text, Black background.

[0;1;37;32m
Green text, Black background.

[0;1;37;33m
Yellow text, Black background.

[0;1;37;34m
Blue text, Black background.

[0;1;37;35m
Fuxia text, Black background.

[0;1;37;36m
Celestial text, Black background.

here are the 8 foreground color codes:

    30.......Black
    31.......Red
    32.......Green
    33.......Yellow
    34.......Blue
    35.......Magenta
    36.......Cyan
    37.......White

And 8 background color codes:

    40.......Black (deafult)
    41.......Red
    42.......Green
    43.......Yellow
    44.......Blue
    45.......Magenta
    46.......Cyan
    47.......White




Select your file to create winrar file

Right click on file and click on  Add  to Archive... option

Select comment window and click on browse button

pick up esc.txt file which you created  and press ok button



Enjoy

 Download    esc.txt file

 

Friday, 18 April 2014

How to print Hello World in servlet

Let us start Servlet first programm,

First of all,

STEP 1:   Create folder in webapps which is exising in Apache Tomcat folder
             
                Folder name as Hello

STEP 2:   Now in Hello folder you have to create index.html file and code as Below


                 <html>
                 <head>
                 <title>Wel come</title>
                 </head>

               <body >
                              <a href="Hello">Click here</a>


               </body>
                </html>
         
             I hope you have created it.

STEP 3: After that create new folder in Hello foder which name is WEB-INF

STEP 4: Now create one file which name is web.xml and make sure it's extenstion is .xml and coded
              with below code
          
             <web-app>
                 <servlet>
                               <servlet-name>Hello</servlet-name>
                               <servlet-class>Hello</servlet-class>
                </servlet>
            
                <servlet-mapping>
                              <servlet-name>Hello</servlet-name>
                              <url-pattern>/Hello</url-pattern>
               </servlet-mapping>

             </web-app>

            this file used to mapping between servlet to your servlet file
  
STEP 5: Now create one folder in WEB-INF foder which name is classes

STEP 6: In classes folder create your servlet file which name is Hello.java
              complie it
              as per below code
           
               import java.io.*;
               import javax.servlet.*;
               import javax.servlet.http.*;

               public class Hello extends HttpServlet {

                                public void doGet(HttpServletRequest request, HttpServletResponse response)
                                                                                            throws IOException, ServletException
                                {
                                         response.setContentType("text/html");
                                         PrintWriter out = response.getWriter();
                                          out.println("<html><body>Hello World!</body></html>");
                                }
                                }

STEP 7:After complation of your programm yu have to open Apche server in
              browser
      
             like ,
                    http://localhost:8080/

            click on manager apps
             and then clcik on list of Application
            After that you found your example name as Hello
           Click on Hello link

     

Enjoy........   

DOWNLOAD EXAMPLE


Downlod files and Extract in webapps folder
         
 

How to change Background color by selecting color from Listview

activitymain.xml file::> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xm...