Connecting J2SE application to servlet

        try{

//        	 establishing an URL connection with servlet
        	DateServletURL = new URL("http://localhost:8080/IFCTech/servlet/huntServlet2");
        	if( DateServletURL == null ){
        		System.out.println("Server URL has not been set");
        	}
        	else
        	{
        		System.out.println("Server URL has been set");
        	DateServletConnection = DateServletURL.openConnection();
        	System.out.println("http://localhost:8080/IFCTech/servlet/huntServlet2");
//        	 inform connection that input and output will take place
        	DateServletConnection.setDoInput(true);
        	DateServletConnection.setDoOutput(true);

//        	 specify not to use cache
        	DateServletConnection.setUseCaches(false);
        	DateServletConnection.setDefaultUseCaches(false);

//        	 specify content type
        	DateServletConnection.setRequestProperty("Content-Type","application/octet-stream");

        	}
        }
        	catch(Exception e)
        	{
        	e.printStackTrace();
        	}

this part is where i need to connect to servlet it goes through the system.out.print

when i on tomcat it didn’t call it