掲示板

HTML Decrations are not working in Liferay

12年前 に Kiran Jai によって更新されました。

HTML Decrations are not working in Liferay

Junior Member 投稿: 38 参加年月日: 12/04/09 最新の投稿
I am using Liferay 6 with Struts2 . I have this Struts2 Tags JSP in Liferay .

<HTML>
<HEAD>
<TITLE>Login using Ravi</TITLE>
</HEAD>
<body bgcolor="#E6E6FA">
<s:form action="helloForm" method="POST" theme="simple">
<table>
<tr>
<td>Enter Your Name:<s:textfield name="namer" value="%{name}" required="true"/></tr>td>
</tr>
<tr>
<td>Enter Your Password:<s:textfield name="passer" value="%{passer}" /></tr>td>
</tr>
</table>
<s:submit/>
<s:submit/>
<s:submit/>
</s:form>
</BODY>
</HTML>

This page is being displayed , but the issue is that , the body color is not being chnaged at all . And also when i tried to set the body height width and all they are not being reflected .

Or is it that using themes only we can achieve this ?
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: HTML Decrations are not working in Liferay

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Have you tried using <body style="background-color:black;"> ? Should be using "style" and css nowadays.
12年前 に Kiran Jai によって更新されました。

RE: HTML Decrations are not working in Liferay

Junior Member 投稿: 38 参加年月日: 12/04/09 最新の投稿
Hitoshi Ozawa:
Have you tried using <body style="background-color:black;"> ? Should be using "style" and css nowadays.



Ya , It worked with that . agree that should use css nowadays , but still the question why the tradational way isn't working ??.
thumbnail
12年前 に David H Nebinger によって更新されました。

RE: HTML Decrations are not working in Liferay

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
Because even though you're page thinks it's generating a whole HTML page, Liferay is going to only grab the content in order to aggregate a whole portal page. So body styling that you use in the jsp page is effectively ignored.

You're not in Kansas any more, Dorothy...
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: HTML Decrations are not working in Liferay

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
As David replied, if you look at the souce code of the generated page, you'll see that the entire page is just one html. Liferay is actually converting codes in a portlet to fit in one html page. Since there should only be one body per html, you really shouldn't be putting body tags in portlets because a html page should only have one header and one body.