Most likely your Dynamic Component Template output type is set to HTML FragmentHTML Fragment
. This instructs Tridion to not do anything with the rendered output as it is plain static HTML.
Change your template output type to REL
when storing DCPs in the database, or JSP Scripting
if storing them on the filesystem.