Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
D Jones
Deployed JSF Portlets Error
March 15, 2009 4:30 AM
Answer

D Jones

Rank: New Member

Posts: 1

Join Date: March 15, 2009

Recent Posts

After deploying a JSF portlet I get this, never had this error before. Bootstrap.js I believe contains all the webui defs which causes all the components in the portlet to fail.

Using

Netbeans 6.5 PP 3.0 Latest

Liferay 5.2.2 Glassfish v2 Windows

Has anyone seen this before.



Error: illegal character
Source File: http://localhost:8080/testwebapp/theme/com/sun/webui/jsf/suntheme4_2-080320/javascript/bootstrap.js
Line: 1
Source Code:
�


Error: webui is not defined
Source File: http://localhost:8080/web/guest/test
Line: 12
Manish Kumar Gupta
RE: Deployed JSF Portlets Error
March 15, 2009 6:05 AM
Answer

Manish Kumar Gupta

LIFERAY STAFF

Rank: Liferay Master

Posts: 535

Join Date: May 15, 2008

Recent Posts

I am not sure but this may be because of speed filter.
see http://issues.liferay.com/browse/LPS-1816

Manish.
Mustafa KIYAR
RE: Deployed JSF Portlets Error
March 17, 2009 12:51 AM
Answer

Mustafa KIYAR

Rank: New Member

Posts: 1

Join Date: March 17, 2009

Recent Posts

D Jones:
After deploying a JSF portlet I get this, never had this error before. Bootstrap.js I believe contains all the webui defs which causes all the components in the portlet to fail.

Using

Netbeans 6.5 PP 3.0 Latest

Liferay 5.2.2 Glassfish v2 Windows

Has anyone seen this before.



Error: illegal character
Source File: http://localhost:8080/testwebapp/theme/com/sun/webui/jsf/suntheme4_2-080320/javascript/bootstrap.js
Line: 1
Source Code:
�


Error: webui is not defined
Source File: http://localhost:8080/web/guest/test
Line: 12


I have experienced the same problem again and again and spent lots of time to fix it. There is no explanation about this problem. Somehow bootstrap.js cannot be read properly. There are some guys having the same problem out there, but no answer. I think JSF development with Liferay is not possible . I will be appreatiated to hear any kind of response about this issue.
Regards ...
Deepak Gothe
Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
March 17, 2009 4:12 AM
Answer

Deepak Gothe

Rank: Junior Member

Posts: 44

Join Date: May 19, 2008

Recent Posts

This is because the speed filters are enabled by default. You need to
add the following line in liferay-plugin-package.properties

speed-filters-enabled=false

The next update of Netbeans Portal Pack 3.0 will do this by default.

Regards,
Deepak
DJ Williams
RE: Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
March 17, 2009 3:54 PM
Answer

DJ Williams

Rank: Junior Member

Posts: 25

Join Date: April 9, 2008

Recent Posts

First thanks Deepak that fixed the problem.

To Mustafa I feel your pain as I have struggled with this for over a week.
Shane Boyer
RE: Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
April 10, 2009 3:08 PM
Answer

Shane Boyer

Rank: New Member

Posts: 5

Join Date: January 30, 2009

Recent Posts

Deepak Gothe:
This is because the speed filters are enabled by default. You need to
add the following line in liferay-plugin-package.properties

speed-filters-enabled=false

The next update of Netbeans Portal Pack 3.0 will do this by default.

Regards,
Deepak


Unfortunately this has not fixed the issue for me. Windows XP, Liferay 5.2.2 Tomcat 6 bundle, I added these to portal-ext.properties:
com.liferay.portal.servlet.filters.compression.CompressionFilter=false
com.liferay.portal.servlet.filters.strip.StripFilter=false
com.liferay.portal.servlet.filters.minifier.MinifierFilter=false

and the liferay-plugin-package.prroperties speed-filters-enabled=false.

With them all present I get errors on startup that the Liferay javascript object does not exist. Commenting out the minifierFilter (so it's true), Liferay will successfully start up, but the other settings have no effect on the "Illegal Character" error from my test JSF portlet - and with the script debugger I still see that my JSF test portlet's bootstrap.js is being compressed, despite the above settings and many portal restarts. The portlet's web.xml does not have the GZip or Minifier filters listed so I know the properties are being read.

If anyone has a suggestion on how to prevent the bootstrap.js from coming back compressed beyond the settings above, I would appreciate it since it sounds like that would resolve my current problem.

Thanks, Shane
DJ Williams
RE: Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
April 11, 2009 3:47 AM
Answer

DJ Williams

Rank: Junior Member

Posts: 25

Join Date: April 9, 2008

Recent Posts

Have you tried Netbeans PortalPack 3.1, I know that the speed filter setting has been added. I also know that all the other settings have been stripped out. It almost seems like the config is not being read.

Here is what I have,

#liferay-plugin-package.properties
#Mon Mar 30 23:39:14 CDT 2009
portal.dependency.jars=commons-logging.jar
tags=portlet
speed-filters-enabled=false
Alexandr Zavalny
RE: Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
June 2, 2009 2:31 AM
Answer

Alexandr Zavalny

Rank: New Member

Posts: 1

Join Date: June 2, 2009

Recent Posts

I had the same error. Here is how I solved it.

The bootstrap error is occurring due to speed filters. The GZip filter tries to archive js file and for some reason corrupts it.

1. I wrote speed-filters-enabled false in the property file, but nothing happened.
2. I searched for <My portlet name> in liferay directory and found 2 files. One of them was an xml file in
..\liferay-portal-tomcat-6.0-5.2.3\liferay-portal-5.2.3\tomcat-6.0.18\conf\Catalina\localhost directory. It contained one line - <Context docBase="<path to my netbeans folder\project folder\build\web"></Context>.
3. I went to this folder and found my portlet files. I opened web.xml, and to my surprise, it was differing from my web.xml in netbeans project. And there were such nodes:

filter-mapping>
<filter-name>Cache Filter - Resource</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>GZip Filter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>Minifier Filter</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>

4. I commented them out, and immediately in tomcat console was message, that portlet is unregistered and registered again.
5. Then I removed it from liferay page (pressing the X button), and added again through Add Application...
6. My portlet was still empty, but after refreshing page, all my controls (except the Static text, don't know why yet) appeared there, and error about bootstrap and webui disappeared.

Ta-daa!

P.S. Unfortunately, I need now to comment these lines every time I redeploy my portlet.
ly tm
RE: Re: [Liferay Forums][2. Using Liferay] RE: Deployed JSF Portlets Error
January 24, 2011 7:43 PM
Answer

ly tm

Rank: New Member

Posts: 13

Join Date: December 12, 2010

Recent Posts

- Hello Everay Body!
- I'm a student come from VietNam!
- I'm studying about Richface framework!
- I had got a problem in JSF(Richface) Portlet when I used JavaScript!
That problem is : I could not get a value into a <h:inputText /> with JavaScript!
Can you help me?
This is my code:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<f:view>
<script type="text/javascript">
function check() {
var result = document.getElementById("myform:form").value;
alert(result);
}
</script>
<h:form id="myform">
<h3>Hello :</h3>
<h:inputText value="" id="form" />
<h:commandButton value="OK" onclick="check();"/>
</h:form>
</f:view>
</ui:composition>
Attachments: errorJS.bmp (262.4k)