If you are willing to be the 'controller' it can work. You will need a digital volt meter.
Depending on the size of your battery, it might take several days to recharge if the battery is depleted.
If you plan on leaving it connected for hours or days without checking the voltage, OR if you only plan to use it to 'maintain' a battery, you will eventually, sooner or later, overcharge the battery and ruin it.
That is a 30 watt panel which is enough to ruin the battery without a controller. You CAN use a 5 or 10 watt solar panel to directly trickle charge a normal sized starter or deep cycle flooded battery, with little or no supervision of the charging process. (the panel should have a blocking diode to limit reverse current at night)
A decent and simple PWM controller will work in your case, and can be had for around $20.