RE: Liferay 7.1 in Double doctype, head and body tag

thumbnail
Ramalingaiah. D, modified 6 Years ago. Expert Posts: 489 Join Date: 8/16/14 Recent Posts
Hi Team,


We have discovered that some of our pages have duplicate tags and scripts. Some of our portlet, create their own doctype,

Suspect it has to do with the portlet  Has anyone had similar problems?

Versions
Liferay 7.1 ce Ga3 (bundled with tomcat-9.0.10),


Liferay runs on windows 10 server with Java jdk1.8.0_172,



it is showing create requisition tab 2 times repeatedly why it showing i have attached home jsp please check it ,if i did any mistake update me
Help out me

 
Thank you 
Ram
thumbnail
Olaf Kock, modified 6 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Ramalingaiah. D

We have discovered that some of our pages have duplicate tags and scripts. Some of our portlet, create their own doctype,

Suspect it has to do with the portlet  Has anyone had similar problems?
If that home.jsp is what renders as your portlet's content (not within an iframe) then indeed: You have duplicate tags, namely <html>, <head> and <body>.
A portlet always renders as a part of a full document, so including those tags in the portlet body is just plain wrong. If you host the content in an iframe, that'd be different, but I'm assuming that you're not doing that (otherwise you would have mentioned it, not a portlet).

Remove the top level tags from the portlet's jsp. Use proper mechanisms to include portlet-specific JS and CSS (as you don't post your portlet's code, it's hard to say how to do it. Generically, there's a declaration in liferay-portlet.xml, which has analog properties for OSGi-DS-based portlets.
thumbnail
Ramalingaiah. D, modified 6 Years ago. Expert Posts: 489 Join Date: 8/16/14 Recent Posts
Hi Olaf Kock,
thank you for replying ,now it is working fine .


Regards
Ram