File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Problem to run ICEfaces sample application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem to run ICEfaces sample application" Watch "Problem to run ICEfaces sample application" New topic
Author

Problem to run ICEfaces sample application

Gabriel Huerta
Greenhorn

Joined: Dec 01, 2009
Posts: 1
Hi
I am trying to acquire a new level of knowledge, figuring out what seems to be the trouble with this

Below message was generated with apache-tomcat-6.0.26 web server.

org.apache.jasper.JasperException: /timezone.jsp(53,8) A literal value was specified for attribute actionListener that is defined as a deferred method with a return type of void. JSP.2.3.4 does not permit literal values in this case

this is the timezone.jsp’s content
<!--
~ Version: MPL 1.1/GPL 2.0/LGPL 2.1
~
~ "The contents of this file are subject to the Mozilla Public License
~ Version 1.1 (the "License"); you may not use this file except in
~ compliance with the License. You may obtain a copy of the License at
~ http://www.mozilla.org/MPL/
~
~ Software distributed under the License is distributed on an "AS IS"
~ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
~ License for the specific language governing rights and limitations under
~ the License.
~
~ The Original Code is ICEfaces 1.5 open source software code, released
~ November 5, 2006. The Initial Developer of the Original Code is ICEsoft
~ Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
~ 2004-2006 ICEsoft Technologies Canada, Corp. All Rights Reserved.
~
~ Contributor(s): _____________________.
~
~ Alternatively, the contents of this file may be used under the terms of
~ the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
~ License), in which case the provisions of the LGPL License are
~ applicable instead of those above. If you wish to allow use of your
~ version of this file only under the terms of the LGPL License and not to
~ allow others to use your version of this file under the MPL, indicate
~ your decision by deleting the provisions above and replace them with
~ the notice and other provisions required by the LGPL License. If you do
~ not delete the provisions above, a recipient may use your version of
~ this file under either the MPL or the LGPL License."
~
-->

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<html>
<head><title>ICEfaces: TimeZone Sample Application</title></head>
<body>
<h3>ICEfaces: TimeZone Sample Application</h3>
<h:form>
<h:panelGrid columns="2">
<hutputText style="font-weight:600" value="Server Time Zone"/>
<hutputText style="font-weight:600"
value="Time Zone Selected from Map"/>
<hutputText value="#{timeZoneBean.serverTimeZoneName}"/>
<hutputText value="#{timeZoneBean.selectedTimeZoneName}"/>
<hutputText style="font-weight:800"
value="#{timeZoneBean.serverTime}"/>
<hutputText style="font-weight:800"
value="#{timeZoneBean.selectedTime}"/>
</h:panelGrid>
<h:commandButton id="map" image="images/map.jpg"
actionListener="#{timeZoneBean.listen}" />
</h:form>
</body>
</html>
</f:view>


And this is the TimeZoneBean’s listen method

/**
* Listens to client input from the commandButton in the UI map and sets the
* selected time zone.
*
* @param event ActionEvent.
*/
public void listen(ActionEvent event) {

FacesContext context = FacesContext.getCurrentInstance();
String clientId = event.getComponent().getClientId(context);
Map requestParams =
context.getExternalContext().getRequestParameterMap();
// get mouse coordinate of user click
int x = Integer.parseInt((String) requestParams.get(clientId + ".x"));
int y = Integer.parseInt((String) requestParams.get(clientId + ".y"));

for (int i = 0; i < allTimeZoneList.size(); i++) {
if (((TimeZoneWrapper) allTimeZoneList.get(i)).getMapPolygon()
.contains(x, y)) {
TimeZoneWrapper tzw = (TimeZoneWrapper) allTimeZoneList.get(i);
selectedTimeZone = TimeZone.getTimeZone(tzw.getId());
selectedFormat = buildDateFormatForTimeZone(selectedTimeZone);
}
}

}

I just want to know what I shoud do in order to avoid this disgusting error.

 
Consider Paul's rocket mass heater.
 
subject: Problem to run ICEfaces sample application
 
Similar Threads
selectManyCheckbox
Multiple Actions issue in JSF
any popup calendar include in jsf
Problem in Editing Table Data
problem in using richfaces