[nycphp-talk] OT - PHP portlet in Java's Liferay portal
Néstor
rotsen at gmail.com
Tue Mar 4 02:43:51 EST 2008
I am in need of help. I have created a chart PHP portlet and I am able to
deploy. The problem is that the PNG image file
displays as binary. I know that the file is created and is there and I can
open it with my browser and it displays the Pie chart
My php code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Libchart pie chart demonstration</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
<img alt="Pie chart" src="<%=renderRequest.getContextPath()%>/demo3.png" />
</body>
</html>
I read in some articles that you need to use the jsp code <%=
renderRequest.getContextPath()%>
but is not working. I also try it without the JSP code and I get the same
result.
This is what is displayed
-----------------
�PNG ���
IHDR��X��������O�G��]IDATx���}�U�����pI��]�"���KE"l*Y�X�T�&Z�BL�����E;�
!m�1�HcT���n0 Q��
��M6��d��5�Y���Rl�p��͝q�3s�s�s��''f�3��
���wϝ�?@�z�'�@@@@?u�����8x���.��ǧ�Zv�sN<�kSf_z�M�_�s��7�����M����=a���#�0�������s��7/
!���eW��I3>M�䙋��v��g�ye��ݷT!���Y�`L3����O���m��p�!<
�o4*8��l�m;�����>�`�ĉB@5B8������M�7=��㢟
<A bunch of other stufff and then the last part of what it is displayed>
��!�H�1{�m�va2�����"g#B���ag'�̋�O��Z�l� �u�KZ
3,b�Kp����#,o5̧���_��`���0�����0�(�2~)ρ�6B�\6�h�a]�X��?��FX��fQ�G���FX��
Q�A�*���FX���u�h���F��vX�4V�yU�m�`#�n;�D
�]��@!�����v�N�٫�h#��0�#����(�`#4
a�'@!�-�B���g#�Q���l�`#4"
a��l��D!�w���Р(���~6B��s�ۃ�l���*���6B�RՉ��g#!�f�2Z�l�
�6¬HÞ���F6BB!�Am�`#!�����F6BB!��F��F��F��F��F��F���!��$�������Y�!!�R@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B�B�B�B��ȟ��9��(e�����IEND�B`�
Pie chart document.getElementById("p_p_id_libchartportlet_WAR_libchartportlet_").portletId
= "libchartportlet_WAR_libchartportlet";
document.getElementById("p_p_id_libchartportlet_WAR_libchartportlet_").columnPos
= 5; if (!Liferay.Portlet.isAjax("libchartportlet_WAR_libchartportlet")) {
Liferay.Portlet.process("libchartportlet_WAR_libchartportlet"); } jQuery(
function() { Liferay.Util.portletTitleEdit( { obj:
jQuery("#p_p_id_libchartportlet_WAR_libchartportlet_"), plid: "10133",
doAsUserId: "", portletId: "libchartportlet_WAR_libchartportlet" } ); } );
-----------------
I do not get all of the the javascript stuff after "Pie chart" above if I do
not use the JSP code.
Any ideas of what is wrong with my PHP displaying of the PNG file.
Thanks,
rotseN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080303/6093c373/attachment.html>
More information about the talk
mailing list