Classification of stringlike solutions in dilaton gravity